Up to [cvs.NetBSD.org] / src / libexec / ld.elf_so
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
use header decl of __fork()
Pull up following revision(s) (requested by rin in ticket #394): external/gpl3/binutils/dist/gas/config/tc-vax.h: revision 1.10 tools/gcc/Makefile: revision 1.109 external/gpl3/binutils/dist/gas/config/tc-vax.c: revision 1.16 external/gpl3/binutils/dist/gas/config/tc-vax.c: revision 1.17 external/gpl3/binutils/dist/gas/config/tc-vax.c: revision 1.18 external/gpl3/gcc.old/dist/gcc/recog.c: revision 1.12 external/gpl3/gcc.old/dist/gcc/function.c: revision 1.16 external/gpl3/gcc.old/dist/gcc/dse.c: revision 1.14 - 1.16 external/gpl3/gcc.old/dist/gcc/config/vax/vax.c: revision 1.13 external/gpl3/gcc.old/dist/gcc/config/vax/vax.c: revision 1.14 external/gpl3/gcc.old/dist/gcc/config/vax/vax.c: revision 1.15 external/gpl3/gcc.old/dist/gcc/doc/tm.texi.in: revision 1.10 external/gpl3/gcc.old/dist/gcc/config/vax/vax.c: revision 1.16 external/gpl3/gcc.old/dist/gcc/config/vax/vax.c: revision 1.17 external/gpl3/gcc.old/dist/gcc/config/vax/vax.c: revision 1.18 external/gpl3/gcc.old/dist/gcc/config/vax/vax.c: revision 1.19 external/gpl3/gcc.old/dist/gcc/config/vax/vax.md: revision 1.12 external/gpl3/gcc.old/dist/gcc/config/vax/vax.md: revision 1.13 external/gpl3/gcc.old/usr.bin/backend/Makefile: revision 1.20 external/gpl3/gcc.old/dist/gcc/targhooks.c: revision 1.12 external/gpl3/gcc.old/dist/gcc/config/vax/vax.md: revision 1.14 external/gpl3/gcc.old/dist/gcc/config/vax/vax.md: revision 1.15 external/gpl3/gcc.old/dist/gcc/config/vax/builtins.md: revision 1.12 external/gpl3/gcc.old/dist/gcc/config/vax/vax.md: revision 1.16 external/gpl3/gcc.old/dist/gcc/config/vax/builtins.md: revision 1.13 external/gpl3/gcc.old/dist/gcc/doc/tm.texi: revision 1.12 external/gpl3/gcc.old/dist/gcc/config/vax/vax.md: revision 1.17 external/gpl3/gcc.old/dist/gcc/config/vax/vax.md: revision 1.18 external/gpl3/gcc.old/dist/gcc/config/vax/elf.h: revision 1.12 external/gpl3/gcc.old/dist/gcc/config/vax/elf.h: revision 1.13 external/gpl3/gcc.old/dist/gcc/targhooks.h: revision 1.12 external/gpl3/gcc.old/dist/gcc/target.def: revision 1.10 external/gpl3/gcc.old/dist/gcc/rtlanal.c: revision 1.14 external/gpl3/gcc.old/dist/gcc/reload.c: revision 1.12 external/gpl3/gcc.old/usr.bin/gcc/Makefile: revision 1.11 external/gpl3/gcc.old/usr.bin/lto-dump/Makefile: revision 1.3 external/gpl3/gcc.old/lib/Makefile.sanitizer: revision 1.7 external/gpl3/binutils.old/lib/libbfd/Makefile: revision 1.10 distrib/utils/x_ping/Makefile: revision 1.9 games/phantasia/Makefile: revision 1.38 external/apache2/argon2/lib/libargon2/Makefile.inc: revision 1.2 external/gpl3/gcc.old/lib/libubsan/Makefile: revision 1.8 external/bsd/mdocml/lib/libmandoc/Makefile: revision 1.13 sbin/ping/Makefile: revision 1.18 sbin/newfs_ext2fs/Makefile: revision 1.7 sys/lib/libz/Makefile: revision 1.24 sys/lib/libsa/Makefile: revision 1.97 external/gpl3/gcc.old/usr.bin/cc1objplus/Makefile: revision 1.3 external/gpl3/gdb/lib/libgdb/Makefile: revision 1.36 sys/modules/lfs/Makefile: revision 1.11 external/mit/xorg/lib/gallium/Makefile: revision 1.51 external/gpl3/gdb.old/lib/libdecnumber/Makefile: revision 1.10 external/mit/xorg/lib/libX11/Makefile.libx11: revision 1.26 libexec/ld.elf_so/Makefile: revision 1.148 external/bsd/jemalloc/lib/Makefile.inc: revision 1.16 external/gpl3/gcc.old/usr.bin/libdecnumber/Makefile: revision 1.14 crypto/external/bsd/openssh/lib/Makefile: revision 1.38 external/gpl3/gcc.old/usr.bin/backend/Makefile: revision 1.21 external/gpl3/gcc.old/usr.bin/cc1/Makefile: revision 1.12 external/gpl3/gcc.old/lib/libasan/Makefile: revision 1.11 external/gpl3/gcc.old/usr.bin/cc1plus/Makefile: revision 1.13 lib/libcrypt/Makefile: revision 1.36 external/gpl3/gdb/lib/libdecnumber/Makefile: revision 1.5 lib/libc/gdtoa/Makefile.inc: revision 1.13 games/gomoku/Makefile: revision 1.13 sbin/fsdb/Makefile: revision 1.43 external/gpl3/gcc.old/usr.bin/lto1/Makefile: revision 1.9 external/mit/xorg/lib/gallium.old/Makefile: revision 1.8 lib/libbz2/Makefile: revision 1.22 external/gpl3/gcc.old/usr.bin/cc1obj/Makefile: revision 1.12 usr.sbin/mtrace/Makefile: revision 1.14 external/gpl3/gcc.old/usr.bin/cc1obj/Makefile: revision 1.13 sys/arch/vax/conf/Makefile.vax: revision 1.86 sys/rump/fs/lib/liblfs/Makefile: revision 1.18 sbin/fsck_ffs/Makefile.common: revision 1.3 external/gpl3/binutils/lib/libbfd/Makefile: revision 1.27 lib/i18n_module/UTF7/Makefile: revision 1.5 external/gpl3/gcc.old/lib/liblsan/Makefile: revision 1.7 doc/CHANGES (apply patch) (all external/gpl3/gcc.old/ changes applied to external/gpl3/gcc/) PR 57646: Import major vax toolchain fix.
Drop -O[01] hacks for vax; no longer necessary for patched GCC 10 PR port-vax/57646: Import major vax toolchain fix by Kalvis Duckmanton XXXRO: GCC 12 may require hacks for a while, but it turned out that GCC 12 should be treated differently from older versions; a lot of new files need -O[01] flags, while some may no longer require it. I will take a look later. Note that these hacks are not required if Kalvis's patches for GCC 12 are applied. Keep doc/HACKS entries for a while (will be sync with update for GCC 12). diff --git a/crypto/external/bsd/openssh/lib/Makefile b/crypto/external/bsd/openssh/lib/Makefile index 96a93f5e396..4e38be1b642 100644 --- a/crypto/external/bsd/openssh/lib/Makefile +++ b/crypto/external/bsd/openssh/lib/Makefile @@ -117,12 +117,6 @@ COPTS.${f}.c+= -Wno-pointer-sign # XXX COPTS.channels.c+= -fno-strict-aliasing -# XXX -.if ${MACHINE} == "vax" -COPTS.poly1305.c+= -O0 -COPTS.umac.c+= -O0 -.endif - COPTS.hostfile.c+= ${CC_WNO_FORMAT_TRUNCATION} COPTS.sshkey.c+= ${CC_WNO_FORMAT_TRUNCATION} COPTS.cipher.c+= -Wno-error=deprecated-declarations diff --git a/distrib/utils/x_ping/Makefile b/distrib/utils/x_ping/Makefile index f1c452a0d60..8ee77580a3f 100644 --- a/distrib/utils/x_ping/Makefile +++ b/distrib/utils/x_ping/Makefile @@ -12,10 +12,6 @@ CPPFLAGS+= -I${SRCDIR} -DCRUNCHOPS DPADD= ${LIBM} LDADD= -lm -.if ${MACHINE_ARCH} == "vax" -COPTS.ping.c=-O0 -.endif - .include <bsd.prog.mk> .PATH: ${SRCDIR} diff --git a/external/apache2/argon2/lib/libargon2/Makefile.inc b/external/apache2/argon2/lib/libargon2/Makefile.inc index d3f4470c6c7..6a1dd146d7d 100644 --- a/external/apache2/argon2/lib/libargon2/Makefile.inc +++ b/external/apache2/argon2/lib/libargon2/Makefile.inc @@ -16,7 +16,3 @@ CFLAGS+= -pthread LDADD+=-lpthread DPADD+=${LIBPTHREAD} .endif - -.if ${MACHINE} == "vax" -COPTS.blake2b.c+= -O0 -.endif diff --git a/external/bsd/jemalloc/lib/Makefile.inc b/external/bsd/jemalloc/lib/Makefile.inc index 2f524358f46..d5da774f293 100644 --- a/external/bsd/jemalloc/lib/Makefile.inc +++ b/external/bsd/jemalloc/lib/Makefile.inc @@ -53,12 +53,6 @@ COPTS.ctl.c+=-Wno-error=stack-protector COPTS.stats.c+=-Wno-error=stack-protector COPTS.tcache.c+=-Wno-error=stack-protector -.if ${MACHINE_ARCH} == "vax" -# in merge_overlapping_regs, at regrename.c -COPTS.arena.c+=-O0 -COPTS.extent.c+=-O0 -.endif - SRCS+=${JEMALLOC_SRCS} jemalloc.d jemalloc.pico jemalloc.o jemalloc.ln jemalloc.po jemalloc.go: \ diff --git a/external/bsd/mdocml/lib/libmandoc/Makefile b/external/bsd/mdocml/lib/libmandoc/Makefile index 40d7e29ae88..dfd3077a2c7 100644 --- a/external/bsd/mdocml/lib/libmandoc/Makefile +++ b/external/bsd/mdocml/lib/libmandoc/Makefile @@ -39,11 +39,6 @@ tbl_opts.c MAN= mandoc.3 -# XXX -.if ${MACHINE} == "vax" -COPTS.mdoc_macro.c+=-O0 -.endif - COPTS.man_validate.c+=-Wno-error=array-bounds .include <bsd.lib.mk> diff --git a/external/gpl3/binutils.old/lib/libbfd/Makefile b/external/gpl3/binutils.old/lib/libbfd/Makefile index 03477232b55..74a354532fa 100644 --- a/external/gpl3/binutils.old/lib/libbfd/Makefile +++ b/external/gpl3/binutils.old/lib/libbfd/Makefile @@ -41,10 +41,6 @@ CPPFLAGS+= -I${.CURDIR}/arch/${BFD_MACHINE_ARCH} -I${DIST}/include -I. \ -DDEBUGDIR=\"${DEBUGDIR}\" -DLIBDIR=\"${LIBDIR}\" \ -DBINDIR=\"${BINDIR}\" -.if (${BFD_MACHINE_ARCH} == "vax") -CPPFLAGS.elf.c += -O0 -.endif - COPTS.pei-x86_64.c+= -Wno-stack-protector COPTS.elfxx-mips.c+= -Wno-stack-protector COPTS.elf.c+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-overflow :} diff --git a/external/gpl3/binutils/lib/libbfd/Makefile b/external/gpl3/binutils/lib/libbfd/Makefile index 00cb2b20081..a3f0c25fd35 100644 --- a/external/gpl3/binutils/lib/libbfd/Makefile +++ b/external/gpl3/binutils/lib/libbfd/Makefile @@ -41,10 +41,6 @@ CPPFLAGS+= -I${.CURDIR}/arch/${BFD_MACHINE_ARCH} -I${DIST}/include -I. \ -DDEBUGDIR=\"${DEBUGDIR}\" -DLIBDIR=\"${LIBDIR}\" \ -DBINDIR=\"${BINDIR}\" -.if (${BFD_MACHINE_ARCH} == "vax") -CPPFLAGS.elf.c += -O0 -.endif - COPTS.pei-x86_64.c+= -Wno-stack-protector COPTS.elfxx-mips.c+= -Wno-stack-protector COPTS.elf.c+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-overflow :} diff --git a/external/gpl3/gcc.old/lib/Makefile.sanitizer b/external/gpl3/gcc.old/lib/Makefile.sanitizer index efd36ae4bee..5173a5109a0 100644 --- a/external/gpl3/gcc.old/lib/Makefile.sanitizer +++ b/external/gpl3/gcc.old/lib/Makefile.sanitizer @@ -88,22 +88,3 @@ COPTS+=-fno-builtin -fno-exceptions -fno-rtti -funwind-tables # Can't profile without it` #-fomit-frame-pointer - -.if ${MACHINE_ARCH} == "vax" -COPTS.sanitizer_allocator.cc += -O1 -COPTS.sanitizer_common.cc += -O1 -COPTS.sanitizer_common_libcdep.cc += -O1 -COPTS.sanitizer_coverage_libcdep.cc += -O1 -COPTS.sanitizer_coverage_mapping_libcdep.cc += -O1 -COPTS.sanitizer_deadlock_detector1.cc += -O1 -COPTS.sanitizer_mac.cc += -O1 -COPTS.sanitizer_netbsd.cc += -O1 -COPTS.sanitizer_posix.cc += -O1 -COPTS.sanitizer_printf.cc += -O1 -COPTS.sanitizer_procmaps_common.cc += -O1 -COPTS.sanitizer_stackdepot.cc += -O1 -COPTS.sanitizer_symbolizer_libcdep.cc += -O1 -COPTS.sanitizer_symbolizer_report.cc += -O1 -COPTS.ubsan_diag.cc += -O1 -COPTS.ubsan_init.cc += -O1 -.endif diff --git a/external/gpl3/gcc.old/lib/libasan/Makefile b/external/gpl3/gcc.old/lib/libasan/Makefile index 1e6f9608abe..3da7bbf2f58 100644 --- a/external/gpl3/gcc.old/lib/libasan/Makefile +++ b/external/gpl3/gcc.old/lib/libasan/Makefile @@ -49,14 +49,6 @@ LIBDPLIBS+= m ${NETBSDSRCDIR}/lib/libm LIBDPLIBS+= pthread ${NETBSDSRCDIR}/lib/libpthread CPPFLAGS+=-DCAN_SANITIZE_UB=0 -.if ${MACHINE_ARCH} == "vax" -COPTS.asan_allocator.cc += -O1 -COPTS.asan_report.cc += -O1 -COPTS.sanitizer_file.cc += -O1 -COPTS.ubsan_diag.cc += -O1 -COPTS.ubsan_init.cc += -O1 -.endif - .if ${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb" COPTS.asan_interceptors.cc += -O1 .endif diff --git a/external/gpl3/gcc.old/lib/liblsan/Makefile b/external/gpl3/gcc.old/lib/liblsan/Makefile index 4578544a9a8..ddb7981077c 100644 --- a/external/gpl3/gcc.old/lib/liblsan/Makefile +++ b/external/gpl3/gcc.old/lib/liblsan/Makefile @@ -16,11 +16,6 @@ LSAN_SRCS+= \ lsan_linux.cc \ lsan_thread.cc -.if ${MACHINE_ARCH} == "vax" -COPTS.lsan_allocator.cc += -O1 -COPTS.sanitizer_file.cc += -O1 -.endif - LIB= lsan SRCS+= ${LSAN_SRCS} LIBDPLIBS+= m ${NETBSDSRCDIR}/lib/libm diff --git a/external/gpl3/gcc.old/lib/libubsan/Makefile b/external/gpl3/gcc.old/lib/libubsan/Makefile index 2e2faca7b1c..9de82550d14 100644 --- a/external/gpl3/gcc.old/lib/libubsan/Makefile +++ b/external/gpl3/gcc.old/lib/libubsan/Makefile @@ -26,10 +26,6 @@ UBSAN_SRCS= \ COPTS.${_s}.cc+=-frtti .endfor -.if ${MACHINE_ARCH} == "vax" -COPTS.sanitizer_file.cc += -O1 -.endif - LIB= ubsan SRCS+= ${UBSAN_SRCS} LIBDPLIBS+= m ${NETBSDSRCDIR}/lib/libm diff --git a/external/gpl3/gcc.old/usr.bin/cc1/Makefile b/external/gpl3/gcc.old/usr.bin/cc1/Makefile index c55e292ee8e..ff12a5be524 100644 --- a/external/gpl3/gcc.old/usr.bin/cc1/Makefile +++ b/external/gpl3/gcc.old/usr.bin/cc1/Makefile @@ -46,17 +46,6 @@ CPPFLAGS.default-c.c+= -I${BACKENDOBJ} BUILDSYMLINKS+= ${GNUHOSTDIST}/gcc/config/sh/sh-c.cc sh-c.c .endif -.if ${MACHINE_CPU} == "vax" -COPTS.c-decl.c+=-O0 -COPTS.c-typeck.c+=-O0 -COPTS.c-array-notation.c+=-O0 -COPTS.c-common.c+=-O0 -COPTS.c-ada-spec.c+=-O0 -COPTS.cilk.c+=-O0 -COPTS.c-ubsan.c+=-O0 -COPTS.cc1-checksum.c+=-O0 -.endif - .if ${MACHINE_ARCH} == "mipseb" || ${MACHINE_ARCH} == "mipsel" COPTS.c-common.c+=-O3 .endif diff --git a/external/gpl3/gcc.old/usr.bin/cc1obj/Makefile b/external/gpl3/gcc.old/usr.bin/cc1obj/Makefile index 3123ee0d60b..aab82ad3448 100644 --- a/external/gpl3/gcc.old/usr.bin/cc1obj/Makefile +++ b/external/gpl3/gcc.old/usr.bin/cc1obj/Makefile @@ -44,16 +44,8 @@ COPTS.objc-act.c+= -Wno-stack-protector COPTS.objc-gnu-runtime-abi-01.c+= -Wno-stack-protector COPTS.objc-next-runtime-abi-01.c+= -Wno-stack-protector -.if ${MACHINE_ARCH} == "vax" -COPTS.c-decl.c+=-O0 -COPTS.c-typeck.c+=-O0 -COPTS.c-array-notation.c+=-O0 -COPTS.c-common.c+=-O0 -COPTS.c-ada-spec.c+=-O0 -COPTS.cilk.c+=-O0 -COPTS.c-ubsan.c+=-O0 -COPTS.cc1obj-checksum.c+=-O0 -.endif +COPTS.c-cppbuiltin.c+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} == 8:? -Wno-error=format-overflow :} +COPTS.c-typeck.c+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} == 8:? -Wno-error=format-overflow :} .if ${MACHINE_ARCH} == "mipseb" || ${MACHINE_ARCH} == "mipsel" COPTS.c-common.c+=-O3 diff --git a/external/gpl3/gcc.old/usr.bin/cc1objplus/Makefile b/external/gpl3/gcc.old/usr.bin/cc1objplus/Makefile index b9c108251c5..e04e8fc7f53 100644 --- a/external/gpl3/gcc.old/usr.bin/cc1objplus/Makefile +++ b/external/gpl3/gcc.old/usr.bin/cc1objplus/Makefile @@ -69,18 +69,6 @@ COPTS.objc-act.c+= -Wno-stack-protector COPTS.objc-gnu-runtime-abi-01.c+= -Wno-stack-protector COPTS.objc-next-runtime-abi-01.c+= -Wno-stack-protector -.if ${MACHINE_ARCH} == "vax" -COPTS.c-decl.c+=-O0 -COPTS.c-typeck.c+=-O0 -COPTS.c-array-notation.c+=-O0 -COPTS.c-common.c+=-O0 -COPTS.c-ada-spec.c+=-O0 -COPTS.cilk.c+=-O0 -COPTS.c-ubsan.c+=-O0 -COPTS.cc1obj-checksum.c+=-O0 -COPTS.decl.c+=-O0 -.endif - .if ${MACHINE_ARCH} == "mipseb" || ${MACHINE_ARCH} == "mipsel" COPTS.c-common.c+=-O3 .endif diff --git a/external/gpl3/gcc.old/usr.bin/cc1plus/Makefile b/external/gpl3/gcc.old/usr.bin/cc1plus/Makefile index 7936efd3a5e..7c54559e21a 100644 --- a/external/gpl3/gcc.old/usr.bin/cc1plus/Makefile +++ b/external/gpl3/gcc.old/usr.bin/cc1plus/Makefile @@ -31,23 +31,6 @@ CHECKSUM_OBJS= ${LIBBACKTRACEOBJ}/libbacktrace.a \ CFLAGS+= -Wno-error=stack-protector -.if ${MACHINE_ARCH} == "vax" -COPTS.call.c+=-O0 -COPTS.decl.c+=-O0 -COPTS.typeck2.c+=-O0 -COPTS.class.c+=-O0 -COPTS.typeck.c+=-O0 -COPTS.init.c+=-O0 -COPTS.semantics.c+=-O0 -COPTS.mangle.c+=-O0 -COPTS.constexpr.c+=-O0 -COPTS.c-common.c+=-O0 -COPTS.c-ada-spec.c+=-O0 -COPTS.cilk.c+=-O0 -COPTS.c-ubsan.c+=-O0 -COPTS.cc1plus-checksum.c+=-O0 -.endif - .if ${MACHINE_ARCH} == "mipseb" || ${MACHINE_ARCH} == "mipsel" COPTS.c-common.c+=-O3 .endif diff --git a/external/gpl3/gcc.old/usr.bin/gcc/Makefile b/external/gpl3/gcc.old/usr.bin/gcc/Makefile index 7a66d77ffc7..a5a4b1c3adf 100644 --- a/external/gpl3/gcc.old/usr.bin/gcc/Makefile +++ b/external/gpl3/gcc.old/usr.bin/gcc/Makefile @@ -25,9 +25,6 @@ ${SRCS}: ${GCCARCH}/defs.mk .include <bsd.info.mk> COPTS.gcc.c= -Wno-stack-protector -.if ${MACHINE_ARCH} == "vax" -COPTS.dse.c= -O1 -.endif .PATH: ${DIST}/gcc ${DIST}/gcc/doc ${DIST}/gcc/c diff --git a/external/gpl3/gcc.old/usr.bin/libdecnumber/Makefile b/external/gpl3/gcc.old/usr.bin/libdecnumber/Makefile index 751d1513eec..33aeb1c9898 100644 --- a/external/gpl3/gcc.old/usr.bin/libdecnumber/Makefile +++ b/external/gpl3/gcc.old/usr.bin/libdecnumber/Makefile @@ -14,10 +14,6 @@ SRCS= decNumber.c decContext.c decimal32.c decimal64.c decimal128.c CPPFLAGS+= -I${.CURDIR}/arch/${GCC_MACHINE_ARCH} -I${DIST}/libdecnumber CPPFLAGS+= -I${DIST}/libgcc -.if ${MACHINE_ARCH} == "vax" -COPTS.decNumber.c=-O0 -.endif - .include <bsd.lib.mk> # Force using C++ for this diff --git a/external/gpl3/gcc.old/usr.bin/lto-dump/Makefile b/external/gpl3/gcc.old/usr.bin/lto-dump/Makefile index 90f44a9fcf6..fd251464fb7 100644 --- a/external/gpl3/gcc.old/usr.bin/lto-dump/Makefile +++ b/external/gpl3/gcc.old/usr.bin/lto-dump/Makefile @@ -24,11 +24,6 @@ COPTS.lto-common.c+= -Wno-stack-protector .include "../Makefile.backtrace" .include "../Makefile.libdecnumber" -.if ${MACHINE_ARCH} == "vax" -COPTS.lto-lang.c+=-O0 -COPTS.lto-symtab.c+=-O0 -.endif - LDADD+= ${LIBIBERTY} ${LIBMPC} ${LIBMPFR} ${LIBGMP} -lintl -lz -lm DPADD+= ${LIBIBERTY} ${LIBMPC} ${LIBMPFR} ${LIBGMP} ${LIBINTL} ${LIBZ} ${LIBM} diff --git a/external/gpl3/gcc.old/usr.bin/lto1/Makefile b/external/gpl3/gcc.old/usr.bin/lto1/Makefile index 4c49161a64c..340d3c6124f 100644 --- a/external/gpl3/gcc.old/usr.bin/lto1/Makefile +++ b/external/gpl3/gcc.old/usr.bin/lto1/Makefile @@ -21,11 +21,6 @@ COPTS.lto-common.c+= -Wno-stack-protector .include "../Makefile.libcpp" .include "../Makefile.libdecnumber" -.if ${MACHINE_ARCH} == "vax" -COPTS.lto-lang.c+=-O0 -COPTS.lto-symtab.c+=-O0 -.endif - LDADD+= ${LIBIBERTYOBJ}/libiberty.a DPADD+= ${LIBIBERTYOBJ}/libiberty.a LDADD+= ${LIBIBERTY} ${LIBMPC} ${LIBMPFR} ${LIBGMP} -lintl -lz -lm diff --git a/external/gpl3/gdb.old/lib/libdecnumber/Makefile b/external/gpl3/gdb.old/lib/libdecnumber/Makefile index bcd4ae5b222..ce28811526b 100644 --- a/external/gpl3/gdb.old/lib/libdecnumber/Makefile +++ b/external/gpl3/gdb.old/lib/libdecnumber/Makefile @@ -18,10 +18,6 @@ CPPFLAGS+= -I${.CURDIR}/arch/${GDB_MACHINE_ARCH} \ SRCS= ${G_OBJS:.o=.c} ${G_SOURCES} -.if ${MACHINE_ARCH} == "vax" -COPTS.decNumber.c=-O0 -.endif - .PATH: ${DIST}/libdecnumber ${DIST}/libdecnumber/dpd .include <bsd.lib.mk> diff --git a/external/gpl3/gdb/lib/libdecnumber/Makefile b/external/gpl3/gdb/lib/libdecnumber/Makefile index c95d36e3dfa..e3169865304 100644 --- a/external/gpl3/gdb/lib/libdecnumber/Makefile +++ b/external/gpl3/gdb/lib/libdecnumber/Makefile @@ -18,10 +18,6 @@ CPPFLAGS+= -I${.CURDIR}/arch/${GDB_MACHINE_ARCH} \ SRCS= ${G_OBJS:.o=.c} ${G_SOURCES} -.if ${MACHINE_ARCH} == "vax" -COPTS.decNumber.c=-O0 -.endif - .PATH: ${DIST}/libdecnumber ${DIST}/libdecnumber/dpd ${DIST}/libdecnumber/bid .include <bsd.lib.mk> diff --git a/external/gpl3/gdb/lib/libgdb/Makefile b/external/gpl3/gdb/lib/libgdb/Makefile index b87a515d13a..c118c363975 100644 --- a/external/gpl3/gdb/lib/libgdb/Makefile +++ b/external/gpl3/gdb/lib/libgdb/Makefile @@ -66,12 +66,6 @@ CFLAGS:= ${CXXFLAGS} -std=gnu++17 -Wno-error=stack-protector ada-exp.c: ada-lex.c -.if ${MACHINE} == "vax" -. if ${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 8 -COPTS.read.c+= -O0 -. endif -.endif - # These are generated by implicit rules and are not easy to generate CLEANDIRFILES+= \ ada-exp.c ada-lex.c \ diff --git a/external/mit/xorg/lib/gallium.old/Makefile b/external/mit/xorg/lib/gallium.old/Makefile index 55b2fe3d1c1..bfa40c8974f 100644 --- a/external/mit/xorg/lib/gallium.old/Makefile +++ b/external/mit/xorg/lib/gallium.old/Makefile @@ -1211,10 +1211,6 @@ SYMLINKS+= gallium_dri.so.${SHLIB_MAJOR}.debug ${DRIDEBUGDIR}/${_d}_dri.so.${SHL COPTS+= ${${ACTIVE_CC} == "clang":? -Wa,-Av8plus :} .endif -.if ${MACHINE_ARCH} == "vax" -COPTS.nir.c += -O1 -.endif - # XXXGCC12 .if ${MACHINE_ARCH} == "m68k" COPTS.st_glsl_to_tgsi.cpp += -O1 diff --git a/external/mit/xorg/lib/gallium/Makefile b/external/mit/xorg/lib/gallium/Makefile index 6778a8c11c8..9f1422080fe 100644 --- a/external/mit/xorg/lib/gallium/Makefile +++ b/external/mit/xorg/lib/gallium/Makefile @@ -1428,10 +1428,6 @@ SYMLINKS+= gallium_dri.so.${SHLIB_MAJOR}.debug ${DRIDEBUGDIR}/${_d}_dri.so.${SHL COPTS+= ${${ACTIVE_CC} == "clang":? -Wa,-Av8plus :} .endif -.if ${MACHINE_ARCH} == "vax" -COPTS.nir.c += -O1 -.endif - COPTS.u_atomic.c+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-builtin-declaration-mismatch :} .include <bsd.lib.mk> diff --git a/external/mit/xorg/lib/libX11/Makefile.libx11 b/external/mit/xorg/lib/libX11/Makefile.libx11 index e103d9ace12..0e55c2a4732 100644 --- a/external/mit/xorg/lib/libX11/Makefile.libx11 +++ b/external/mit/xorg/lib/libX11/Makefile.libx11 @@ -471,11 +471,6 @@ COPTS.OpenDis.c+= -Wno-error # XXX xf86bigfstr.h COPTS.XlibInt.c+= -Wno-error # XXX xcmiscstr.h COPTS.XKBBind.c+= -Wno-deprecated-declarations # uses XKeycodeToKeysym -# XXX -.if ${MACHINE} == "vax" -COPTS.lcWrap.c+= -O0 -.endif - CWARNFLAGS.clang+= -Wno-string-plus-int .include "${NETBSDSRCDIR}/external/mit/xorg/tools/makekeys/Makefile.makekeys" diff --git a/games/gomoku/Makefile b/games/gomoku/Makefile index e86a63aaea7..678537066ed 100644 --- a/games/gomoku/Makefile +++ b/games/gomoku/Makefile @@ -9,10 +9,6 @@ LDADD= -lcurses -lterminfo HIDEGAME=hidegame CPPFLAGS+= ${DEBUG:D-DDEBUG} -.if ${MACHINE} == "vax" -COPTS.pickmove.c += -O0 -.endif - #WARNS= 6 # would produce warnings about small integer types LINTFLAGS+= -w # treat warnings as errors LINTFLAGS+= -T # strict bool mode diff --git a/games/phantasia/Makefile b/games/phantasia/Makefile index e9c53f23ae5..b919dac17c6 100644 --- a/games/phantasia/Makefile +++ b/games/phantasia/Makefile @@ -52,7 +52,3 @@ map: map.c ./map | plot > /dev/tty .include <bsd.prog.mk> - -.if defined(HAVE_GCC) && ${MACHINE_ARCH} == "vax" -COPTS.misc.c+= -O0 -.endif diff --git a/lib/i18n_module/UTF7/Makefile b/lib/i18n_module/UTF7/Makefile index 712c1515d42..7136f7f0cc3 100644 --- a/lib/i18n_module/UTF7/Makefile +++ b/lib/i18n_module/UTF7/Makefile @@ -3,6 +3,3 @@ SRCPRE=citrus_ .include <bsd.lib.mk> -.if ${MACHINE_ARCH} == "vax" && defined(HAVE_GCC) -COPTS.citrus_utf7.c+= -O0 -.endif diff --git a/lib/libbz2/Makefile b/lib/libbz2/Makefile index b2aea1e04b0..e60a2862d48 100644 --- a/lib/libbz2/Makefile +++ b/lib/libbz2/Makefile @@ -15,11 +15,6 @@ SRCS= blocksort.c huffman.c crctable.c randtable.c compress.c \ INCS= bzlib.h INCSDIR= /usr/include -# XXX huffman.c gets mis-compiled with 2.95.3 -.if ${MACHINE_ARCH} == "vax" -COPTS+= -O0 -.endif - COPTS+= ${CC_WNO_IMPLICIT_FALLTHROUGH} # XXX blocksort.c gets mis-compiled with 4.1 diff --git a/lib/libc/gdtoa/Makefile.inc b/lib/libc/gdtoa/Makefile.inc index 132686fc33d..609da919803 100644 --- a/lib/libc/gdtoa/Makefile.inc +++ b/lib/libc/gdtoa/Makefile.inc @@ -44,10 +44,3 @@ SRCS+= dmisc.c \ .if ${MACHINE_ARCH} != "vax" SRCS+= strtord.c .endif - -# XXX revisit with newer GCC. -# Ensure numbers like 0xffff319f5fa95963 print correctly -# ("999999999999999.98", not garbage like "?A>C>@>C:BA;A><.:<") -.if ${MACHINE_ARCH} == "vax" && defined(HAVE_GCC) -COPTS.misc.c+= -O0 -.endif diff --git a/lib/libcrypt/Makefile b/lib/libcrypt/Makefile index cb3f89d6d09..e9c8be820da 100644 --- a/lib/libcrypt/Makefile +++ b/lib/libcrypt/Makefile @@ -30,9 +30,6 @@ SRCS+= crypt-argon2.c SRCS+= ${src} COPTS.${src}+= -fvisibility=hidden . endfor -. if ${MACHINE} == "vax" -COPTS.blake2b.c+= -O0 -. endif .endif WARNS?= 5 diff --git a/libexec/ld.elf_so/Makefile b/libexec/ld.elf_so/Makefile index f5baae1e883..24f7e1121e5 100644 --- a/libexec/ld.elf_so/Makefile +++ b/libexec/ld.elf_so/Makefile @@ -141,10 +141,6 @@ CPPFLAGS+= -DRTLD_DEFAULT_LIBRARY_PATH=\"${SHLIBDIR}:${LIBDIR}\" COPTS.rtld.c+= -Wno-stack-protector COPTS.symbol.c+=-Wno-stack-protector -.if ${MACHINE_CPU} == "vax" -COPTS.rtld.c+= -O0 -.endif - LDADD+= -Wl,--version-script=${.CURDIR}/symbols.map LDADD+= -L${CLIBOBJ} -L${DESTDIR}${LIBDIR} .if ${MKPICLIB} != "no" diff --git a/sbin/fsck_ffs/Makefile.common b/sbin/fsck_ffs/Makefile.common index 765638b2801..824e3bf2628 100644 --- a/sbin/fsck_ffs/Makefile.common +++ b/sbin/fsck_ffs/Makefile.common @@ -36,7 +36,3 @@ COPTS.ffs_appleufs.c+= -Wno-pointer-sign .if ${MACHINE_ARCH} == "m68000" COPTS.pass1.c+= -fno-tree-fre -fno-tree-lrs .endif -.if ${MACHINE_ARCH} == "vax" -COPTS.pass1.c+= -O0 -COPTS.inode.c+= -O0 -.endif diff --git a/sbin/fsdb/Makefile b/sbin/fsdb/Makefile index c039f73a1eb..3b0331e5880 100644 --- a/sbin/fsdb/Makefile +++ b/sbin/fsdb/Makefile @@ -39,12 +39,6 @@ COPTS.${f}.c+= -Wno-pointer-sign COPTS.pass1.c+= -fno-tree-fre -fno-tree-lrs .endif -.if ${MACHINE_ARCH} == "vax" -COPTS.pass1.c+= -O0 -COPTS.inode.c+= -O0 -COPTS.fsdb.c+= -O0 -.endif - CWARNFLAGS.gcc+= ${CC_WNO_ADDRESS_OF_PACKED_MEMBER} .include <bsd.prog.mk> diff --git a/sbin/newfs_ext2fs/Makefile b/sbin/newfs_ext2fs/Makefile index 40a44b9a038..ecfdbff4d3a 100644 --- a/sbin/newfs_ext2fs/Makefile +++ b/sbin/newfs_ext2fs/Makefile @@ -20,8 +20,4 @@ DPADD+=${LIBPROP} .PATH: ${NETBSDSRCDIR}/sys/ufs/ext2fs ${FSCK} -.if ${MACHINE_ARCH} == "vax" -COPTS.mke2fs.c=-O0 -.endif - .include <bsd.prog.mk> diff --git a/sbin/ping/Makefile b/sbin/ping/Makefile index 4f33501ea7a..1f7f56e3ea5 100644 --- a/sbin/ping/Makefile +++ b/sbin/ping/Makefile @@ -12,8 +12,4 @@ CPPFLAGS+= -DIPSEC LDADD+= -lipsec DPADD+= ${LIBIPSEC} -.if ${MACHINE_ARCH} == "vax" -COPTS.ping.c=-O0 -.endif - .include <bsd.prog.mk> diff --git a/sys/arch/vax/conf/Makefile.vax b/sys/arch/vax/conf/Makefile.vax index cf095d54a86..c483eaa644a 100644 --- a/sys/arch/vax/conf/Makefile.vax +++ b/sys/arch/vax/conf/Makefile.vax @@ -34,7 +34,6 @@ GENASSYM_CONF= ${VAX}/vax/genassym.cf CPPFLAGS+= -D_VAX_INLINE_ AFLAGS+= -x assembler-with-cpp -fno-pic CFLAGS+= -fno-pic -COPTS.wsmux.c+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 9:? -O1 :} ## diff --git a/sys/lib/libsa/Makefile b/sys/lib/libsa/Makefile index 718c97ce857..4ef3840c753 100644 --- a/sys/lib/libsa/Makefile +++ b/sys/lib/libsa/Makefile @@ -96,7 +96,3 @@ SRCS+= ufs.c lib${LIB}.o:: ${OBJS:O} __buildstdlib CPPFLAGS+= -Wno-pointer-sign - -.if defined(HAVE_GCC) && ${MACHINE_ARCH} == "vax" -COPTS.bootp.c+= -O0 -.endif diff --git a/sys/lib/libz/Makefile b/sys/lib/libz/Makefile index 6945c0da6c6..61fb7d4f652 100644 --- a/sys/lib/libz/Makefile +++ b/sys/lib/libz/Makefile @@ -25,7 +25,3 @@ CLEANFILES+= lib${LIB}.o .include <bsd.lib.mk> lib${LIB}.o:: ${OBJS:O} __buildstdlib - -.if defined(HAVE_GCC) && ${MACHINE_ARCH} == "vax" -COPTS.inftrees.c+= -O0 -.endif diff --git a/sys/modules/lfs/Makefile b/sys/modules/lfs/Makefile index 962538821a5..ea8f187e160 100644 --- a/sys/modules/lfs/Makefile +++ b/sys/modules/lfs/Makefile @@ -18,9 +18,4 @@ SRCS+= ulfs_bmap.c ulfs_dirhash.c ulfs_inode.c ulfs_lookup.c \ WARNS= 3 -.if ${MACHINE} == "vax" -# GCC 6.5 and 7.4 cannot compile this with -DDIAGNOSTIC and -O2/-O1 -COPTS.lfs_inode.c+= -O0 -.endif - .include <bsd.kmodule.mk> diff --git a/sys/rump/fs/lib/liblfs/Makefile b/sys/rump/fs/lib/liblfs/Makefile index abade3767d9..68b74c62502 100644 --- a/sys/rump/fs/lib/liblfs/Makefile +++ b/sys/rump/fs/lib/liblfs/Makefile @@ -17,9 +17,6 @@ SRCS+= ulfs_bmap.c ulfs_dirhash.c ulfs_extattr.c \ CFLAGS+= -DLFS_KERNEL_RFW -.if ${MACHINE_ARCH} == "vax" -COPTS.lfs_inode.c+=-O0 -.endif .include <bsd.lib.mk> .include <bsd.klinks.mk> diff --git a/usr.sbin/mtrace/Makefile b/usr.sbin/mtrace/Makefile index aef09db6198..9c125c15265 100644 --- a/usr.sbin/mtrace/Makefile +++ b/usr.sbin/mtrace/Makefile @@ -12,10 +12,6 @@ PROG= mtrace SRCS= igmp.c inet.c kern.c mtrace.c MAN= mtrace.8 -.if ${MACHINE_ARCH} == "vax" -COPTS.mtrace.c=-O0 -.endif - BINMODE=4555 BINOWN= root diff --git a/external/gpl3/gcc.old/usr.bin/backend/Makefile b/external/gpl3/gcc.old/usr.bin/backend/Makefile index d69a26fe619..99e881c783d 100644 --- a/external/gpl3/gcc.old/usr.bin/backend/Makefile +++ b/external/gpl3/gcc.old/usr.bin/backend/Makefile @@ -533,68 +533,9 @@ COPTS.insn-recog.c+=-Wno-error .if ${GCC_MACHINE_ARCH} == "vax" CPPFLAGS+=-I${.CURDIR}/../../lib/libgcc/libgcov/arch/${GCC_MACHINE_ARCH} -COPTS.builtins.c+=-O0 -COPTS.calls.c+=-O0 -COPTS.convert.c+=-O0 -COPTS.data-streamer-out.c+=-O0 -COPTS.dse.c+=-O0 # XXX port-vax/51967 -COPTS.dwarf2out.c+=-O0 -COPTS.expmed.c+=-O0 -COPTS.expr.c+=-O0 -Wno-error=tautological-compare -COPTS.fixed-value.c+=-O0 -COPTS.fold-const.c+=-O0 -COPTS.generic-match.c+=-O0 -COPTS.gimple-fold.c+=-O0 -COPTS.gimple-match.c+=-O0 -COPTS.gimple-ssa-strength-reduction.c+=-O0 -COPTS.gimple-ssa-warn-restrict.c+=-O0 -COPTS.gimple.c+=-O0 -COPTS.internal-fn.c+=-O0 -COPTS.lto-streamer-out.c+=-O0 -COPTS.omp-low.c+=-O0 -COPTS.predict.c+=-O0 -COPTS.range-op.cc+=-O0 -COPTS.recog.c+=-O0 -COPTS.sanopt.c+=-O0 -COPTS.stmt.c+=-O0 -COPTS.stor-layout.c+=-O0 -COPTS.targhooks.c+=-O0 -COPTS.tree-affine.c+=-O0 -COPTS.tree-cfg.c+=-O0 -COPTS.tree-data-ref.c+=-O0 -COPTS.tree-eh.c+=-O0 -COPTS.tree-if-conv.c+=-O0 -COPTS.tree-object-size.c+=-O0 -COPTS.tree-parloops.c+=-O0 -COPTS.tree-predcom.c+=-O0 -COPTS.tree-pretty-print.c+=-O0 -COPTS.tree-ssa-alias.c+=-O0 -COPTS.tree-ssa-ccp.c+=-O0 -COPTS.tree-ssa-forwprop.c+=-O0 -COPTS.tree-ssa-loop-ivopts.c+=-O0 -COPTS.tree-ssa-loop-manip.c+=-O0 -COPTS.tree-ssa-loop-niter.c+=-O0 -COPTS.tree-ssa-math-opts.c+=-O0 -COPTS.tree-ssa-phiopt.c+= -O0 -COPTS.tree-ssa-pre.c+=-O0 -COPTS.tree-ssa-reassoc.c+=-O0 -COPTS.tree-ssa-strlen.c+=-O0 -COPTS.tree-ssa-uninit.c+=-O0 -COPTS.tree-ssa.c+=-O0 -COPTS.tree-switch-conversion.c+=-O0 -COPTS.tree-vect-data-refs.c+=-O0 -COPTS.tree-vect-loop-manip.c+=-O0 -COPTS.tree-vect-loop.c+=-O0 -COPTS.tree-vect-patterns.c+=-O0 -COPTS.tree-vect-stmts.c+=-O0 -COPTS.tree-vrp.c+=-O0 -COPTS.tree.c+=-O0 -COPTS.ubsan.c+=-O0 -COPTS.varasm.c+=-O0 -COPTS.vr-values.c+=-O0 -COPTS.web.c+=-O0 -COPTS.wide-int-range.cc+=-O0 -COPTS.wide-int.cc+=-O0 + +COPTS.expmed.c+=-Wno-error=tautological-compare +COPTS.expr.c+=-Wno-error=tautological-compare .else COPTS.tree.c= ${${ACTIVE_CC} == "clang" :? -O0 :} .endif
Pull up the following revisions(s) (requested by riastradh in ticket #1712): distrib/sets/lists/debug/mi: revision 1.409 via patch distrib/sets/lists/tests/mi: revision 1.1280 via patch libexec/ld.elf_so/Makefile: revision 1.145-1.147 via patch libexec/ld.elf_so/hash.c: revision 1.1 via patch libexec/ld.elf_so/hash.h: revision 1.1 via patch libexec/ld.elf_so/symbol.c: revision 1.74-1.76 via patch tests/libexec/ld.elf_so/Makefile: revision 1.21 via patch tests/libexec/ld.elf_so/t_hash.c: revision 1.1 via patch ld.elf_so: Fix sysv elf hash on edge cases like `ZZZZZW9p' on LP64 platforms where long is 64-bit.
Pull up following revision(s) (requested by riastradh in ticket #1886): distrib/sets/lists/debug/mi 1.409 (patch) distrib/sets/lists/tests/mi 1.1280 (patch) libexec/ld.elf_so/Makefile 1.145-1.147 (patch) libexec/ld.elf_so/hash.c 1.1 libexec/ld.elf_so/hash.h 1.1 libexec/ld.elf_so/reloc.c 1.118 (patch) libexec/ld.elf_so/rtld.c 1.215 (patch) libexec/ld.elf_so/rtld.h 1.145,1.147 (patch) libexec/ld.elf_so/symbol.c 1.74-1.76 (patch) tests/libexec/ld.elf_so/Makefile 1.21 (patch) tests/libexec/ld.elf_so/t_hash.c 1.1 The SysV ABI specifies that the symbol hash function should return only 32 bits of hash. Unfortunately due to an implementation bu and the fact that the return type is unsigned long which is 64 bits in LP64, this can fail in some cases: "\xff\x0f\x0f\x0f\x0f\x0f\x12". See: https://maskray.me/blog/2023-04-12-elf-hash-function From Ed Maste @ FreeBSD: https://cgit.freebsd.org/src/commit/?id=29e3a06510823edbb91667d21f530d3ec778116d Need to write Unit Tests for this. Oops wrong mask. ld.elf_so: Split SRCS onto multiple lines. Makes updates easier. No functional change intended. ld.elf_so: Sort SRCS. No functional change intended. ld.elf_so: Split hash functions into a separate file. This way we can test them in isolation. No functional change intended. ld.elf_so: Add some known-answer tests for hash functions. Make sure the testing mechanism detects the traditional overflow bug.
Pull up following revision(s) (requested by riastradh in ticket #300): libexec/ld.elf_so/rtld.h: revision 1.145 libexec/ld.elf_so/symbol.c: revision 1.74 libexec/ld.elf_so/rtld.h: revision 1.147 libexec/ld.elf_so/symbol.c: revision 1.75 libexec/ld.elf_so/symbol.c: revision 1.76 tests/libexec/ld.elf_so/t_hash.c: revision 1.1 libexec/ld.elf_so/Makefile: revision 1.145 libexec/ld.elf_so/Makefile: revision 1.146 libexec/ld.elf_so/Makefile: revision 1.147 libexec/ld.elf_so/reloc.c: revision 1.118 distrib/sets/lists/tests/mi: revision 1.1280 libexec/ld.elf_so/rtld.c: revision 1.215 tests/libexec/ld.elf_so/Makefile: revision 1.21 libexec/ld.elf_so/hash.c: revision 1.1 libexec/ld.elf_so/hash.h: revision 1.1 distrib/sets/lists/debug/mi: revision 1.409 The SysV ABI specifies that the symbol hash function should return only 32 bits of hash. Unfortunately due to an implementation bug and the fact that the return type is unsigned long which is 64 bits in LP64, this can fail in some cases: "\xff\x0f\x0f\x0f\x0f\x0f\x12". See: "https://maskray.me/blog/2023-04-12-elf-hash-function From Ed Maste @ FreeBSD: https://cgit.freebsd.org/src/commit/?id=29e3a06510823edbb91667d21f530d3ec778116d Need to write Unit Tests for this. Oops wrong mask. ld.elf_so: Split SRCS onto multiple lines. Makes updates easier. No functional change intended. ld.elf_so: Sort SRCS. No functional change intended. ld.elf_so: Split hash functions into a separate file. This way we can test them in isolation. No functional change intended. ld.elf_so: Add some known-answer tests for hash functions. Make sure the testing mechanism detects the traditional overflow bug.
ld.elf_so: Split hash functions into a separate file. This way we can test them in isolation. No functional change intended.
ld.elf_so: Sort SRCS. No functional change intended.
ld.elf_so: Split SRCS onto multiple lines. Makes updates easier. No functional change intended.
Error if there are undefined symbols, e.g. _rtld_call_ifunc
Mostly merge changes from HEAD upto 20200411
Merge changes from current as of 20200406
Specify NOLIBCSANITIZER for the ELF loader The sanitizer does not work reliably before finishing initialization of ld.elf_so. There is also a number of false positives that are not real problems here.
Pull up following revision(s) (requested by nakayama in ticket #469): lib/libc/tls/tls.c: revision 1.10 lib/libc/tls/tls.c: revision 1.11 lib/libc/tls/tls.c: revision 1.12 lib/libc/tls/tls.c: revision 1.13 libexec/ld.elf_so/tls.c: revision 1.13 libexec/ld.elf_so/tls.c: revision 1.14 libexec/ld.elf_so/Makefile: revision 1.142 lib/libc/tls/Makefile.inc: revision 1.3 usr.bin/ldd/Makefile.elf: revision 1.6 PR 54093: Align static TLS area to max_align_t. Use alignof and not size_t for platforms with non-natural base alignments. Mirror the ld.elf_so logic for handling aligning the TLS size. Most noticable, recompute the start of the TLS area for variant I relative to the TCB. This makes a difference when the segment size and base alignment don't agree. Fix PR/54074 and PR/54093 completely. More similar to the ld.elf_so logic, it is necessary to align with p_align first. Also, invert the #ifdef condition for consistency. Should fix regression for static linking binaries: http://releng.netbsd.org/b5reports/sparc/commits-2019.11.html#2019.11.10.23.39.03 http://releng.netbsd.org/b5reports/sparc64/commits-2019.11.html#2019.11.16.04.10.33
PR 54093: Align static TLS area to max_align_t.
Sync with HEAD
Disable optimization for rtld.c on the vax with gcc-7.
Synch with HEAD
initfini array support for everyone.
Sync with head
Move compatibility for pre-2.0 ELF binaries into separate file. Early ELF binaries defined dlopen and friends in crt0.o by using function pointers in the object handle passed from rtld. This contract wastes space when many shared objects are allocated and ties dynamic linker and rest of the system tightly together. Fake the entry points in a static object and restrict them to the platforms that had working ELF support at the time. Keep the magic and version field used by modern crt0.o for all architectures. The checks will be removed from crt0.o in a follow-up step.
Sync with HEAD
We can't build those three with MKSANITIZER, they are used too early.
Pull up following revision(s) (requested by joerg in ticket #64): libexec/ld.elf_so/arch/arm/mdreloc.c: revision 1.40 libexec/ld.elf_so/arch/arm/mdreloc.c: revision 1.41 libexec/ld.elf_so/arch/hppa/hppa_reloc.c: revision 1.44 libexec/ld.elf_so/arch/riscv/mdreloc.c: revision 1.3 libexec/ld.elf_so/arch/aarch64/mdreloc.c: revision 1.3 libexec/ld.elf_so/arch/sparc64/mdreloc.c: revision 1.60 libexec/ld.elf_so/arch/m68k/mdreloc.c: revision 1.32 libexec/ld.elf_so/arch/sparc64/mdreloc.c: revision 1.61 libexec/ld.elf_so/arch/or1k/mdreloc.c: revision 1.2 libexec/ld.elf_so/arch/sparc/mdreloc.c: revision 1.50 libexec/ld.elf_so/arch/sh3/mdreloc.c: revision 1.33 libexec/ld.elf_so/arch/sh3/mdreloc.c: revision 1.34 libexec/ld.elf_so/arch/arm/mdreloc.c: revision 1.39 libexec/ld.elf_so/symbol.c: revision 1.68 libexec/ld.elf_so/arch/mips/mips_reloc.c: revision 1.66 libexec/ld.elf_so/arch/mips/mips_reloc.c: revision 1.67 libexec/ld.elf_so/arch/mips/mips_reloc.c: revision 1.68 libexec/ld.elf_so/arch/x86_64/mdreloc.c: revision 1.42 libexec/ld.elf_so/arch/powerpc/ppc_reloc.c: revision 1.54 libexec/ld.elf_so/Makefile: revision 1.137 libexec/ld.elf_so/arch/vax/mdreloc.c: revision 1.32 libexec/ld.elf_so/rtld.h: revision 1.127 libexec/ld.elf_so/arch/vax/mdreloc.c: revision 1.33 libexec/ld.elf_so/arch/i386/mdreloc.c: revision 1.38 libexec/ld.elf_so/arch/alpha/alpha_reloc.c: revision 1.42 libexec/ld.elf_so/map_object.c: revision 1.58 libexec/ld.elf_so/arch/sparc/mdreloc.c: revision 1.49 Replace COMBREL with just-in-time check in _rtld_relocate_nonplt_objects. The COMBREL logic predates thread-safety of the dynamic linker and breaks the use of shared locks for the common symbol lookup case. It is unlikely to provide any benefit for lazy binding or PLT lookups, so provide equivalent functionality in the non-PLT relocation handling loop by checking if the symbol used by the current relocation is the same as the one used during the last lookup. No inter-object cachine is done as it is also unlikely to be benefical. Testing with Firefox startup on AMD64 shows a small performance gain by the new method. Drop symbol number from default branch diagnostic, it isn't set at this point and most likely not valid either. Expand symnum, GCC's uninitialized used tracking is too imprecise. Fix C&P bug. Deal with more MIPS hacks overriding def. Add last_symnum, move up def and defobj. Add back symnum, fix debug print. Replace last use of r_type. Fix indentation. Fix indentation.
Replace COMBREL with just-in-time check in _rtld_relocate_nonplt_objects. The COMBREL logic predates thread-safety of the dynamic linker and breaks the use of shared locks for the common symbol lookup case. It is unlikely to provide any benefit for lazy binding or PLT lookups, so provide equivalent functionality in the non-PLT relocation handling loop by checking if the symbol used by the current relocation is the same as the one used during the last lookup. No inter-object cachine is done as it is also unlikely to be benefical. Testing with Firefox startup on AMD64 shows a small performance gain by the new method.
Sync with HEAD. (Note that most of these changes are simply $NetBSD$ tag issues.)
Instead of using a function to resolve symbols that should be supplied by the dynamic linker itself, use a version script that exposes them. From joerg@
Sync with HEAD
revert, I'll fix libc instead.
Mips o32 needs -lgcc for __udivdi3 in headers.c for fast_divide32_prepare().
Move relro after we've computed out relocbase and re-enable it. (Matthias Weckbecker)
Turn off GNU_RELRO for now.
Add support for GNU RELRO headers from Matthias Weckbecker.
Define _KERNTYPES for things that need it.
RISC-V support.
OR1K support
Rebase to HEAD as of a few days ago.
Changes to existing files to enable building AARCH64 userland. evbarm64-el This is clang only. While gcc4.8 supports aarch64, no netbsd support has been written for aarch64 with gcc4.8.
sync with head. for a reference, the tree before this commit was tagged as yamt-pagecache-tag8. this commit was splitted into small chunks to avoid a limitation of cvs. ("Protocol error: too many arguments")
Enable building ld.elf_so for powerpc Produce a link map for ld.elf_so
Remove hack now it's fixed in 4.8.2
Apply hack for gcc 4.8 bug on rtld.c.
Use MACHINE_CPU for m68k. Use similar logic for both tests.
Some architectures can't create unwind tables without the frame pointer, so don't use -fomit-frame-pointer on those.
sync with HEAD
Support MACHINE_ARCH of coldfire
resync from head
Fix debug symlink
provide debug symlink.
don't overwrite COPTS
Consistently use LDELFSO_MACHINE_ARCH.
Add support for PT_ARM_EXIDX and __gnu_Unwind_Find_exidx for libgcc's support of the ARM EHABI.
split debug info for rtld
Pullup from HEAD: Add .init_array/.fini_array support (conditionalized on HAVE_INITFINI_ARRAY).
sync with head
Revert last, it breaks the tricks xsrc uses.
Remove SHLIBINSTALLDIR and SHLINKINSTALLLIBDIR. Add rpath entries, if SHLIBDIR differs from /usr/lib.
Don't abuse DBG, use COPTS instead.
sync with head
Pull up following revision(s) via patch (requested by skrll in ticket #1724): rescue/list.ldd: revision 1.4 lib/libc/dlfcn/dlfcn_elf.c: revision 1.7 libexec/ld.elf_so/arch/mips/mips_reloc.c: revision 1.57 distrib/sets/lists/comp/mi: revision 1.1512 share/man/man3/Makefile: revision 1.56 libexec/ld.elf_so/arch/mips/mips_reloc.c: revision 1.58 usr.bin/ldd/ldd.c: revision 1.15 libexec/ld.elf_so/rtld.h: revision 1.84 share/man/man3/dl_iterate_phdr.3: revision 1.1 libexec/ld.elf_so/rtld.c: revision 1.129 libexec/ld.elf_so/arch/powerpc/ppc_reloc.c: revision 1.44 libexec/ld.elf_so/rtld.h: revision 1.89 libexec/ld.elf_so/arch/x86_64/mdreloc.c: revision 1.36 libexec/ld.elf_so/map_object.c: revision 1.41 libexec/ld.elf_so/arch/x86_64/mdreloc.c: revision 1.37 libexec/ld.elf_so/arch/sparc64/mdreloc.c: revision 1.46 include/link_elf.h: revision 1.10 libexec/ld.elf_so/arch/i386/mdreloc.c: revision 1.29 libexec/ld.elf_so/arch/vax/mdreloc.c: revision 1.26 libexec/ld.elf_so/arch/alpha/alpha_reloc.c: revision 1.34 libexec/ld.elf_so/arch/hppa/hppa_reloc.c: revision 1.31 libexec/ld.elf_so/arch/alpha/alpha_reloc.c: revision 1.35 libexec/ld.elf_so/Makefile: revision 1.94 libexec/ld.elf_so/arch/hppa/hppa_reloc.c: revision 1.32 libexec/ld.elf_so/Makefile: revision 1.95 libexec/ld.elf_so/arch/arm/mdreloc.c: revision 1.31 libexec/ld.elf_so/Makefile: revision 1.96 libexec/ld.elf_so/arch/arm/mdreloc.c: revision 1.32 libexec/ld.elf_so/reloc.c: revision 1.98 libexec/ld.elf_so/arch/arm/mdreloc.c: revision 1.33 sys/sys/exec_elf.h: revision 1.106 libexec/ld.elf_so/rtld.c: revision 1.130 libexec/ld.elf_so/load.c: revision 1.37 libexec/ld.elf_so/rtld.c: revision 1.131 libexec/ld.elf_so/load.c: revision 1.38 libexec/ld.elf_so/rtld.h: revision 1.90 libexec/ld.elf_so/headers.c: revision 1.36 libexec/ld.elf_so/rtld.h: revision 1.95 libexec/ld.elf_so/arch/i386/mdreloc.c: revision 1.30 libexec/ld.elf_so/arch/m68k/mdreloc.c: revision 1.25 libexec/ld.elf_so/symbol.c: revision 1.50 libexec/ld.elf_so/symbol.c: revision 1.51 libexec/ld.elf_so/arch/sparc/mdreloc.c: revision 1.43 libexec/ld.elf_so/symbol.c: revision 1.52 libexec/ld.elf_so/arch/sh3/mdreloc.c: revision 1.27 libexec/ld.elf_so/symbol.c: revision 1.54 PR/39240: Satoshi Suetake: Don't fail when attempting to resolve weak symbols when we are doing immediate binding, leave them alone and they will be dealt with later during lazy binding. From skrll@ Implement negative cache checks for symbol lookups. Uses the Donelist idea from FreeBSD. Use alloca(3) instead of local xmalloc for creating our DoneLists. This allows threaded programs to use us a little better, PR lib/43005. Implement dl_iterate_phdr. Somewhat taken from FreeBSD. Manual page from OpenBSD.
Add __diagassert13() so that if libc is compiled with _DIAGNOSTIC, it does not end up bringing in all of stdio. XXX: This is temporary.
obsolete libgcc_pic and friends. all libgcc's are supposed to be pic for platforms with shlibs already (and are.) this obsoletes our hacks for the libgcc specs to use libgcc_pic, and fixes a couple of other issues reported to me directly.
sh3 also needs libgcc_pic for millicode (cf. revision 1.107)
PR/45015: ld.elf_so: support ELF symbol versioning Applied latest patch.
Catchup with rmind-uvmplock merge.
Add libgcc_pic for millicode.
Use -Wl,-Bsymbolic directly for clang
Disable use of various X86 extensions since _rtld_bind_start doesn't save the necessary registers.
Explicitly disable linking against libgcc and friends.
Add TLS support infrastructure. For dynamic binaries, ld.elf_so exports _rtld_tls_allocate and _rtld_tls_free. libpthread uses this functions to setup the thread private area of all new threads. ld.elf_so is responsible for setting up the private area for the initial thread. Similar functions are called from _libc_init for static binaries, using dl_iterate_phdr to access the ELF Program Header. Add test cases to exercise the different TLS storage models. Test cases are compiled and installed on all platforms, but are skipped on platforms not marked for TLS support. This material is based upon work partially supported by The NetBSD Foundation under a contract with Joerg Sonnenberger. It is inspired by the TLS support in FreeBSD by Doug Rabson and the clean ups of the DragonFly port of the original FreeBSD modifications.
Warn about DT_TEXTRELs
Apply patch (requested by mrg in ticket #1499): src/compat version 2. this allows building any number of alternate library / program target ABIs. rather than duplicating the list of subdirs and Makefiles to build, it re-traverses the necessary ones. details: - add support for MAKEDIRTARGETENV to share/mk - renames LD32DIR to MLIBDIR - fixes library builds for some subdirs (more was built than needed) - fixes /bin & /sbin apps in compat mode - reduces complexity in src/compat and the rest of the tree - updates ldd netbsd32 support
Replace use of errlist with a single concatenated version and an offset array. This requires less storage and avoids one runtime relocation per errno value.
Don't use normal environment handling functions from libc, but iterate once over the array and clean out entries as needed.
Build ld.elf_so with -fvisibility=hidden. Exploit this for i386/x86_64 to simplify the assembler code.
PR/44010: YAMAMOTO Takashi: sbrk: grow 0xb3ba2000 failed, error = 12" (due to setenv changes?) Provide a mini unsetenv that does not allocate/free memory and does not bother about locking.
remove almost all the ability to build netbsd with an a.out target. we're ELF now, and there are many missing checks against OBJECT_FMT. if we ever consider switching, the we can figure out what new ones we need but for now it's just clutter. this doesn't remove any of the support for exec_aout or any actually required-for-boot a.out support, only the ability to build a netbsd release in a.out format. ie, most of this code has been dead for over a decade. i've tested builds on vax, amd64, i386, mac68k, macppc, sparc, atari, amiga, shark, cats, dreamcast, landisk, mmeye and x68k. this covers the 5 MACHINE_ARCH's affected, and all the other arch code touched. it also includes some actual run-time testing of sparc, i386 and shark, and i performed binary comparison upon amiga and x68k as well. some minor details relevant: - move shlib.[ch] from ld.aout_so into ldconfig proper, and cut them down to only the parts ldconfig needs - remove various unused source files - switch amiga bootblocks to using elf2bb.h instead of aout2bb.h
Only apply -Wno-stack-protector where alloca is used.
Use the gcc directive to disable SSP warnings.
Use alloca(3) instead of local xmalloc for creating our DoneLists. This allows threaded programs to use us a little better, PR lib/43005. We need to disable SSP when using alloca.
merge from -current: >rename LD32DIR to MLIBDIR. >- adjust the logic for compat ldd: add an elf32_compat module and arrange > for mips64 to build this with MLIBDIR set to o32 >- make mips64 ldd call elf32_compat_ldd as well >- make mips64 elf64 set MLIBDIR to 64 >- don't need ld.elf_so's Makefile.ld32 files anymore (they are going away > soon anyway) > >tested on amd64 and sparc64, and an earlier version tested on mips64. >if BSD_MK_COMPAT_FILE is defined, .include it. >simplify the logic for compat ld.elf_so and move it here. we now can >find the libc objdir for multiple compat ld.elf_so's, too.
simplify the logic for compat ld.elf_so and move it here. we now can find the libc objdir for multiple compat ld.elf_so's, too.
if BSD_MK_COMPAT_FILE is defined, .include it.
rename LD32DIR to MLIBDIR.
Add a reminder about ldd depending on ld.so.
warns=4
Sync with HEAD. Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
Default to WARNS=4 Exceptions that need a lower level are: getty ld.elf_so lfs_cleanerd makewhatis telnetd tftpd hpropd ipropd-master ipropd-slave kadmind kpasswdd
if LD32DIR is defined: - look in src/compat/lib/libc for libc_pic. - define RTLD_ARCH_SUBDIR to "i386" or "sparc" for amd64 and sparc64 builds, respectively if RTLD_ARCH_SUBDIR is defined, add this path before RTLD_DEFAULT_LIBRARY_PATH in the default search path.
Never build this with PIE.
sync with HEAD
No need for stack_protector.o if USE_FORT is no. XXX: compiling a binary with -Wl,--dynamic-linker,${NETBSDSRCDIR}/libexec/... results in stack overflow. Investigate!
stack_protector.c has moved.
sync with HEAD
Build a local copy of exit that doesn't call __cxa_finalize. It's not needed and drags in a lot of libc via free.
build stack protector locally so that we don't call syslog_ss that results in 1/2 of libc dragged in.
- Don't use the names malloc/free/etc, since we can end up pulling in libc's malloc which is not what we want. - Remove ancient memory compaction hack. Realloc on free memory is now an error again (from joerg@). Ok christos@.
If we are using SSP, compile in a separate copy of the stack protector functions so that we don't end up calling syslog_ss() which drags in a large portion of libc. Found by skrll...
Sync w/ NetBSD-4-RC_1
Pull up following revision(s) (requested by soren in ticket #774): build.sh: revision 1.169 gnu/usr.bin/gcc4/backend/Makefile: revision 1.9 sys/arch/evbsh5/README: revision 1.1 distrib/notes/common/contents: revision 1.124 usr.sbin/ndbootd/ndbootd.c: revision 1.12 gnu/lib/libopcodes/arch/sh3eb/defs.mk: revision 1.4 gnu/lib/libbfd/arch/sh3eb/defs.mk: revision 1.8 libexec/ld.elf_so/Makefile: revision 1.78 gnu/dist/binutils/bfd/config.bfd: revision 1.14 doc/HACKS: revision 1.93 distrib/cdrom/current.conf: revision 1.8 gnu/lib/libgcc4/Makefile.inc: revision 1.6 share/mk/sys.mk: revision 1.90 distrib/sets/lists/base/mi: revision 1.700 libexec/ld.elf_so/rtld.c: revision 1.112 distrib/sets/lists/base/mi: revision 1.702 sys/arch/sh5/README: revision 1.1 gnu/lib/libbfd/arch/sh3el/bfd.h: revision 1.7 usr.sbin/traceroute/traceroute.c: revision 1.69 distrib/notes/common/main: revision 1.330 distrib/notes/common/list-setsizes.sh: revision 1.2 sys/arch/Makefile: revision 1.35 gnu/lib/libopcodes/arch/sh3el/defs.mk: revision 1.4 gnu/lib/libbfd/arch/sh3el/defs.mk: revision 1.8 share/mk/bsd.own.mk: revision 1.495 gnu/lib/libbfd/arch/sh3eb/bfd.h: revision 1.7 x11/lib/OSmesa/Makefile: revision 1.20 sys/dev/dkwedge/dkwedge_bsdlabel.c: revision 1.13 gnu/dist/binutils/opcodes/configure.in: revision 1.2 gnu/dist/binutils/opcodes/configure: revision 1.2 gnu/usr.bin/send-pr/categories: revision 1.53 etc/mtree/NetBSD.dist: revision 1.339 sys/arch/README: revision 1.42 lib/libc/gdtoa/Makefile.inc: revision 1.6 usr.bin/crunch/crunchide/Makefile: revision 1.16 sys/lkm/net/bsdcomp/Makefile: revision 1.5 regress/sys/uvm/Makefile: revision 1.6 etc/MAKEDEV.awk: revision 1.18 x11/Xserver/GL/GLcore/Makefile.GLcore: revision 1.10 sys/contrib/dev/ath/netbsd/Makefile.ath.inc: revision 1.14 gnu/lib/libbfd/Makefile: revision 1.42 doc/RESPONSIBLE: revision 1.78 Remove evbsh5.
Support Solaris-like $ORIGIN etc. expansions in paths.
Remove support for NetBSD/{,evb}sh5.
Deal with MKPICLIB != no.
Remove MD COMBRELOC support since it's now MI. Enable COMBRELOC for all arches
Simplify multiple MACHINE_ARCH endian checks with single MACHINE_CPU checks.
Add (back) -Wl,-static to the link.
Remove -Wl,-non_shared (same meaing as -static).
Explicitly prefix ld(1) options in LDFLAGS with "-Wl," rather than using the ${LDFLAGS:@F@-Wl,$F@} make substitution because that breaks if LDFLAGS is already set.
Backout -DDEBUG that I accidently commited with the last change
Add LD_BIND_NOW support for sparc and remove some relocation types that are not supposed to happen in 32bit code. From Nick Hudson.
Apply patch (request by skrll in ticket #1702): Bring "ld.elf_so" (mostly) in sync with NetBSD-current: - MI and MD (e.g. under NetBSD-alpha) performance improvements - RTLD_SELF, RTLD_NEXT, RTLD_DEFAULT support - much better structured code - closes PR bin/25464
Be more pedantic about where we use -shared, etc.
Whitespace.
Whitespace.
Use CC instead of LD to link the ld.elf_so. This will correctly link "millicode" from libgcc_pic.a on platforms that need it. From Nick Hudson <skrll@netbsd>.
Move common LDFLAGS into Makefile from arch/*/Makefile.inc
Rework how MAKEVERBOSE operates: * Don't bother prefixing commands with a line of ${_MKCMD}\ and instead rely upon "make -s". This is less intrusive on all the Makefiles than the former. Idea from David Laight. * Rename the variables use to print messages. The scheme now is: _MKMSG_FOO Run _MKMSG 'foo' _MKTARGET_FOO Run _MKMSG_FOO ${.TARGET} From discussion with Alistair Crooks.
rework to use the newer _MKMSGCREATE (et al) macros
support MAKEVERBOSE
Add support for shared libraries/dynamically linked binaries on sh5. With the latest SuperH toolchain, NetBSD/evbsh5 can now run with a fully dynamic userland (modulo a few remaining gremlins affecting a couple of binaries).
Do not add ${LIBC_PIC} to DPADD if MKPICINSTALL is "no".
Apply patch to fix previous pullup (requested by zuntum in ticket #994)
Pull up revision 1.50 (via patch, requested by thorpej in ticket #663): Build for ``armeb''.
Disable DEBUG again.
Don't call _rtld_process_mapping() with null string.
Only use the MKDYNAMICROOT semantics (i.e. -rpath=/lib,/usr/lib and -dynamic-linker=/libexec/ld.elf_so) if the BINDIR of the program being built is /bin or /sbin. The reason we do this is because now all programs *except* those in /bin and /sbin (i.e. the "special cases") match the default the compiler uses, which is what is used for things in e.g. xsrc, pkgsrc, and other random 3rd party programs. This is done by decoupling where a shlib is installed from how it is located. Two new variables, SHLIBINSTALLDIR and SHLINKINSTALLDIR, contain the former information, and key off MKDYNAMICROOT only. SHLIBDIR and SHLINKDIR contain the latter, and key off MKDYNAMICROOT and BINDIR. The SHLIBINSTALLDIR, SHLIBDIR, _LIBSODIR, SHLINKINSTALLDIR, and SHLINKDIR parameters are moved to a new <bsd.shlib.mk>; see bsd.README for usage details.
*poof* -fomit-frame-pointer works on 68k.
-vomit-frame-pointer is buggy on 68k. *sigh*
By default, compile without DEBUG, and with -fomit-frame-pointer.
Turn DEBUG back on by default. It doesn't take much space.
Turn off DEBUG by default, and compile with -O3. (Tested on Alpha, ARM, x86 and PowerPC.)
Use ${NETBSDSRCDIR}/some/path instead of ${.CURDIR}/../../some/path
Build for "armeb".
Add support for dynamic linking on HP PA-RISC.
Don't bomb if the ${DPADD} files are missing -- we want at least one of them, where the other may not exist, and the linker will fail for us if both don't exist.
Use ${MACHINE_CPU} to assign ARCHSUBDIR.
Add support for dynamic linking on the SuperH. From Marcus Comstedt, with some bug fixes (namely, don't forget to consider the addend when processing relocations) from me.
Install the man page on a.out systems as well so that the man set is the same for all.
Revert rev. 1.30 (partly). If MKPICINSTALL=no in mk.conf, libc_pic.a will NOT be installed by the time we build here. However, allow the link to look in both src/lib/libc and $DESTDIR/usr/lib.
- Allow RTLD_DEFAULT_LIBRARY_PATH to be overridden. - If ${SHLIBDIR} != ${LIBDIR}, then set RTLD_DEFAULT_LIBRARY_PATH to ${SHLIBDIR}:${LIBDIR}
if SHLINKDIR != /usr/libexec, install compat symlink
* Add user-controlled mk.conf variables - SHLIBDIR Location to install shared libraries if ${USE_SHLIBDIR} is "yes". Defaults to "/usr/lib". - USE_SHLIBDIR If "yes", install shared libraries in ${SHLIBDIR} instead of ${LIBDIR}. Defaults to "no". Sets ${_LIBSODIR} to the appropriate value. This may be set by individual Makefiles as well. - SHLINKDIR Location of shared linker. Defaults to "/usr/libexec". If != "/usr/libexec", change the dynamic-linker encoded in shared programs * Set USE_SHLIBDIR for libraries used by /bin and /sbin: libc libcrypt libcrypto libedit libipsec libkvm libm libmi387 libtermcap libutil libz * If ${_LIBSODIR} != ${LIBDIR}, add symlinks from ${LIBDIR}/${LIB}.so* to ${_LIBSODIR}/${LIB}.so* for compatibility. * Always install /sbin/init statically (for now) The net effect of these changes depends on how the variables are set: 1.) If nothing is set or changed, there is no change from the current behaviour: - Static /bin, /sbin, and bits of /usr/* - Dynamic rest - Shared linker is /usr/libexec/ld*so 2.) If the following make variables are set: LDSTATIC= SHLINKDIR=/lib SHLIBDIR=/lib Then the behaviour becomes: - Dynamic tools - .so libraries used by /bin and /sbin are installed to /lib, with symlinks from /usr/lib/lib*so to -> /lib/lib*so where appropriate - Shared linker is /lib/ld*so 3.) As per 2.), but add the following variable: USE_SHLIBDIR=yes This forces all .so's to be instaleld in /lib (with compat symlinks), not just those tagged by their Makefiles to be. Again, compat symlinks are installed
Don't put compiler options into CPPFLAGS.
Add a man page for ld.elf_so.
Enable arm if OBJECT_FMT is ELF. Initialize first few GOT entries for ARM.
Preliminary x86-64 support. Not fully functional yet (toolchain bugs).
back out previous commit; I found a better way of handling the missing dependencies.
Don't use ${OBJS} in the dependency line, cause it is not defined yet. Also add a .NOTMAIN for good measure.
When dlopen()ing with RTLD_GLOBAL, also make dependent libraries RTLD_GLOBAL.
Split DEBUG into two lines to make it easier to enable each separately.
If OBJECT_FMT is ELF and MACHINE_ARCH = vax, build ld.elf_so
Don't try to get libc_pic from the libc compile directory. If we're doing a build, libc has already been installed.
Protect certain definitions from view by crt0, by wrapping them in #ifdef _RTLD_SOURCE. Should fix the "variable page size" build error of crt0 on the SPARC.
Don't even make depend if we're not going to build ld.elf_so. this is especially important if the assembler syntax is different.
Always use ${MACHINE_ARCH} rather than ${MACHINE}, and reorder architectures a bit.
Add m68k code.
Move the link.h files for the different shlib formats via repository copy, and rename them to match the executable format. Introduce a new link.h file which automatically picks the correct header based on the target of the toolchain.
make the mipse[lb]->mips translation really work, thanks Izumi Tsutsui
Make this compile without -DRTLD_LOADER and fix printf format problems on the alpha.
Makefile ${MACHINE_ARCH} changes for mips{eb,el}, as suggested by Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
Cleanup global variable access so rtld can be self relocating. Also KNF reloc.c and move md sparc parts to arch/sparc/mdreloc.c Now we don't need to load at address 0 on the i386 and the mips should be trivial to fix.
Replace home-grown header file installation with INCS/INCSDIR; from Erik Bertelsen in PR bin/6869.
convert from NOxxx= to MKxxx=no. include <bsd.own.mk> if testing a MKxxx variable.
Add -DRTLD_DEBUG_RELOC commented out.
Add i386 bits
Add powerpc support.
remove MD asm as(1) comments from sysident.h, placing them in a comment above the asm() block. now we can share sysident.h across all ports.. change ld.elf_so to be for $MACHINE == sparc64 not sparc (yet!).
Use -L for libc's objdir in case NOPICINSTALL is set in mk.conf.
Don't install the ELF link.h in a.out systems!@#$#@
Use NOPIC to mean "no shared libraries", not NOSHLIB.
Sync with trunk, per request of mycroft.
Add support for mips.
More table-driven changes for different toolchains: * new bsd.own.mk variable OBJECT_FMT with values "a.out" or "ELF". * use OBJECT_FMT in Makefile tests that depend on toolchain. * Add new bsd.own.mk variable NOSHLIB that, if set indicates a given port doesnt yet do shared libraries. Set on powerpc. * Document new feature-test variables in src/share/mk/bsd.README. Tested on i386, mips, fakedup Alpha environment.
sync with trunk (approved by thorpej)
Pull rev 1.10 up from trunk (cjs)
Update to 1.10.
Link with the stuff we compiled, rather that whatever random stuff happens to be installed on the system we're compiling on.
Pull rev 1.9 up from trunk
Install our ELF-aware link.h into /usr/include on mips hosts.
use CPPFLAGS instead of CFLAGS
The include of bsd.own.mk was accidently deleted; put it back in.
update to 1.7
move man pages into share/man.
Back out BUILDDIR and NOINSTALL changes.
These updates to the build allow building against include files and libs in the object tree, if you use a separate object tree, while maintaining backward compatability with other build methods. See the notes in src/share/mk/bsd.README for full details. Note that the `make includes' target now only installs the include files in the build directory (if you use one--otherwise they go in DESTDIR just like before); `make install' will install include files in DESTDIR.
STRIP -> STRIPFLAG (sign, I guess I forgot to check this one in last night)
pull in arch-specific Makefile.inc only if it exists
- Makefile cleanups
First cut at an ELF shared loader. Originally from John Polstra's FreeBSD elf kit, then hacked on by Matt Thomas <matt@3am-software.com>, then by me (to make it work with new versions of the toolchain, etc.). This runs, but it's in serious need of cleaning and/or a fair bit of reworking. See the README file for more information, and a list of things to do.