Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Failing build for NetBSD-amd64



I can't cross-build NetBSD-current/amd64 on macOS anymore. I guess this is because of the new binutils. The build fails with this message:


dependall ===> lib/libc
/dist/tools.amd64/bin/x86_64--netbsd-ld: warning: /tmp/pkgsrc/destdir.amd64/usr/lib/crtn.o: missing .note.GNU-stack section implies executable stack
/dist/tools.amd64/bin/x86_64--netbsd-ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
x86_64--netbsd-clang: error: linker command failed with exit code 1 (use -v to see invocation)
--- libc.so.12.220 ---

*** Failed target: libc.so.12.220
*** Failed commands:
${_MKTARGET_BUILD}
=> @# "  build " libc/libc.so.12.220
rm -f ${.TARGET}
=> rm -f libc.so.12.220
${LIBCC} ${LDLIBC} -shared ${SHLIB_SHFLAGS}  ${_LDFLAGS.${_LIB}} -o ${.TARGET}.tmp ${_LIBLDOPTS}  -Wl,--whole-archive ${SOLIB}  -Wl,--no-whole-archive ${_LDADD.${_LIB}}
=> /dist/tools.amd64/bin/x86_64--netbsd-clang -nodefaultlibs -shared -Wl,-soname,libc.so.12  -Wl,--warn-shared-textrel -Wl,-Map=libc.so.12.map -Wl,-z,initfirst -Wl,-z,defs   --sysroot=/tmp/pkgsrc/destdir.amd64 -Wl,--fatal-warnings -Wl,--warn-shared-textrel -Wl,-z,relro  -o libc.so.12.220.tmp  -Wl,-rpath,/lib  -L=/lib -Wl,-x  -Wl,--whole-archive libc_pic.a  -Wl,--no-whole-archive  
${OBJCOPY} -R .ident ${.TARGET}.tmp
=> /dist/tools.amd64/bin/x86_64--netbsd-objcopy -R .ident libc.so.12.220.tmp
${MV} ${.TARGET}.tmp ${.TARGET}
=> mv -f libc.so.12.220.tmp libc.so.12.220
${HOST_LN} -sf ${_LIB.so.full} ${_LIB.so.major}.tmp
=> ln -sf libc.so.12.220 libc.so.12.tmp
${MV} ${_LIB.so.major}.tmp ${_LIB.so.major}
=> mv -f libc.so.12.tmp libc.so.12
${HOST_LN} -sf ${_LIB.so.full} ${_LIB.so}.tmp
=> ln -sf libc.so.12.220 libc.so.tmp
${MV} ${_LIB.so}.tmp ${_LIB.so}
=> mv -f libc.so.tmp libc.so
*** [libc.so.12.220] Error code 1



I can remove LDFLAGS+=-Wl,--fatal-warnings from share/mk/bsd.sys.mk, then the build proceeds, but later fails with:


/dist/tools.amd64/bin/x86_64--netbsd-ld: warning: memcpy.o: missing .note.GNU-stack section implies executable stack
/dist/tools.amd64/bin/x86_64--netbsd-ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
start_dos.o: in function `start':
(.text+0x34): relocation truncated to fit: R_386_16 against symbol `ourseg' defined in .data section in start_dos.o
(.text+0x4a): relocation truncated to fit: R_386_16 against `.data'
(.text+0x4e): relocation truncated to fit: R_386_16 against `.data'
(.text+0x51): relocation truncated to fit: R_386_16 against `.data'
(.text+0x55): relocation truncated to fit: R_386_16 against `.data'
(.text+0x58): relocation truncated to fit: R_386_16 against `.data'
(.text+0x5c): relocation truncated to fit: R_386_16 against `.data'
(.text+0x67): relocation truncated to fit: R_386_16 against `.data'
start_dos.o: in function `real_to_prot':
(.text+0x96): relocation truncated to fit: R_386_16 against `.data'
start_dos.o: in function `dump_eax':
(.text+0x1b9): relocation truncated to fit: R_386_16 against `.data'
start_dos.o: in function `checkxms':
(.text+0x226): additional relocation overflows omitted from the output
dependall ===> sys/modules/accf_dataready
x86_64--netbsd-clang: error: linker command failed with exit code 1 (use -v to see invocation)
--- dependall-external ---

nbmake[4]: stopped in /dist/src
--- dependall-modules ---

nbmake[5]: stopped in /dist/src/sys
--- dosboot.com ---

*** Failed target: dosboot.com
*** Failed commands:
${_MKTARGET_LINK}
=> @# "   link " dosboot/dosboot.com
${CC} -o ${BASE}.sym ${LDFLAGS} -Wl,-Ttext,${RELOC}  ${STARTFILE} ${OBJS} ${LIBLIST} >${BASE}.list
=> /dist/tools.amd64/bin/x86_64--netbsd-clang -o dosboot.sym  --sysroot=/tmp/pkgsrc/destdir.amd64 -nostdlib -Wl,-m,elf_i386 -Wl,-M -Wl,-e,start  -Wl,-z,relro -Wl,-Ttext,0x100  start_dos.o doscommain.o main.o devopen.o exec.o exec_multiboot1.o exec_multiboot2.o getopt.o vers.o /tmp/pkgsrc/obj.amd64/sys/arch/i386/stand/dosboot/lib/i386/libi386.a /tmp/pkgsrc/obj.amd64/sys/arch/i386/stand/dosboot/lib/sa/libsa.a /tmp/pkgsrc/obj.amd64/sys/arch/i386/stand/dosboot/lib/z/libz.a /tmp/pkgsrc/obj.amd64/sys/arch/i386/stand/dosboot/lib/sa/libsa.a /tmp/pkgsrc/obj.amd64/sys/arch/i386/stand/dosboot/lib/kern/libkern.a /tmp/pkgsrc/obj.amd64/sys/arch/i386/stand/dosboot/lib/i386/libi386.a /tmp/pkgsrc/obj.amd64/sys/arch/i386/stand/dosboot/lib/sa/libsa.a >dosboot.list
${OBJCOPY} -O binary ${BASE}.sym ${BASE}.com
=> /dist/tools.amd64/bin/x86_64--netbsd-objcopy -O binary dosboot.sym dosboot.com


Am I doing something wrong?

I have HAVE_LLVM=yes defined.

I have successfully built for arm64 from the same source.

Kind regards,
Adam


Home | Main Index | Thread Index | Old Index