Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 411419 - sys-devel/bmake is not NetBSD's bmake
Summary: sys-devel/bmake is not NetBSD's bmake
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal QA (vote)
Assignee: Gentoo/BSD Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-10 05:20 UTC by Richard Yao (RETIRED)
Modified: 2012-05-14 23:48 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Yao (RETIRED) gentoo-dev 2012-04-10 05:20:28 UTC
If you do, `svn checkout svn://svn.freebsd.org/base/release/9.0.0 && cd 9.0.0/sys/boot/i386/btx/lib && env CFLAGS="" bmake -m ../../../../share/mk` on Gentoo Linux amd64, you should see the following:

$ env CFLAGS="" bmake -m ../../../../share/mk      
Warning: Object directory not changed from original /home/richard/devel/9.0.0/sys/boot/i386/pmbr
as  --defsym FLAGS= --32 -o pmbr.o pmbr.s
cc "-march=core2 -mtune=core2 -mcx16 -msahf -msse4.1 --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=6144 -O2 -pipe"  -ffreestanding -mpreferred-stack-boundary=2  -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float -m32 -march=i386 -std=gnu99   -e start -Ttext 0x600 -Wl,-N,-S,--oformat,binary -nostdlib -m elf_i386_fbsd -o pmbr pmbr.o 
gcc: error: elf_i386_fbsd: No such file or directory
*** Error code 1

Stop.
bmake: stopped in /home/richard/devel/9.0.0/sys/boot/i386/pmbr

Yet, if you clean the directory and use pmake, it will work:

$ env CFLAGS="" pmake -m ../../../../share/mk      
Warning: Object directory not changed from original /home/richard/devel/9.0.0/sys/boot/i386/pmbr
as  --defsym FLAGS= -o pmbr.o pmbr.s
cc "-march=core2 -mtune=core2 -mcx16 -msahf -msse4.1 --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=6144 -O2 -pipe"  -ffreestanding -mpreferred-stack-boundary=2  -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float -std=gnu99   -e start -Ttext 0x600 -Wl,-N,-S,--oformat,binary -nostdlib -o pmbr pmbr.o

bmake is appending '-m elf_i386_fbsd' to the output before the target. I had a chat with a few NetBSD developers in #pkgsrc on freenode and it seems that this should not be happening.

We are currently using sjk's fork of NetBSD's bmake, which seems to have diverged from NetBSD. Would it be possible to switch to the one in NetBSD?

ASau in #pkgsrc gave me a link to a tarball that might be helpful for this:

ftp://ftp.netbsd.org/pub/NetBSD/misc/asau/bmake-rip.tar.gz
Comment 1 Naohiro Aota gentoo-dev 2012-05-14 23:12:16 UTC
(In reply to comment #0)
> If you do, `svn checkout svn://svn.freebsd.org/base/release/9.0.0 && cd
> 9.0.0/sys/boot/i386/btx/lib && env CFLAGS="" bmake -m ../../../../share/mk`
> on Gentoo Linux amd64, you should see the following:
> 
> $ env CFLAGS="" bmake -m ../../../../share/mk      
> Warning: Object directory not changed from original
> /home/richard/devel/9.0.0/sys/boot/i386/pmbr
> as  --defsym FLAGS= --32 -o pmbr.o pmbr.s
> cc "-march=core2 -mtune=core2 -mcx16 -msahf -msse4.1 --param
> l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=6144
> -O2 -pipe"  -ffreestanding -mpreferred-stack-boundary=2  -mno-mmx -mno-3dnow
> -mno-sse -mno-sse2 -mno-sse3 -msoft-float -m32 -march=i386 -std=gnu99   -e
> start -Ttext 0x600 -Wl,-N,-S,--oformat,binary -nostdlib -m elf_i386_fbsd -o
> pmbr pmbr.o 
> gcc: error: elf_i386_fbsd: No such file or directory
> *** Error code 1
> 
> Stop.
> bmake: stopped in /home/richard/devel/9.0.0/sys/boot/i386/pmbr
> 
> Yet, if you clean the directory and use pmake, it will work:
> 
> $ env CFLAGS="" pmake -m ../../../../share/mk      
> Warning: Object directory not changed from original
> /home/richard/devel/9.0.0/sys/boot/i386/pmbr
> as  --defsym FLAGS= -o pmbr.o pmbr.s
> cc "-march=core2 -mtune=core2 -mcx16 -msahf -msse4.1 --param
> l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=6144
> -O2 -pipe"  -ffreestanding -mpreferred-stack-boundary=2  -mno-mmx -mno-3dnow
> -mno-sse -mno-sse2 -mno-sse3 -msoft-float -std=gnu99   -e start -Ttext 0x600
> -Wl,-N,-S,--oformat,binary -nostdlib -o pmbr pmbr.o
> 
> bmake is appending '-m elf_i386_fbsd' to the output before the target. I had
> a chat with a few NetBSD developers in #pkgsrc on freenode and it seems that
> this should not be happening.

freebsd-9.0.0/sys/boot/i386/Makefile.inc appending it.

> .if ${MACHINE_CPUARCH} == "amd64"
> CFLAGS+=        -m32 -march=i386
> ACFLAGS+=       -m32
> LDFLAGS+=       -m elf_i386_fbsd
> AFLAGS+=        --32
> .endif

I don't think this package dose have problem.
Comment 2 Richard Yao (RETIRED) gentoo-dev 2012-05-14 23:47:51 UTC
You are right. I am closing this.