head 1.9; access; symbols netbsd-10-0-RELEASE:1.8 netbsd-10-0-RC6:1.8 netbsd-10-0-RC5:1.8 netbsd-10-0-RC4:1.8 netbsd-10-0-RC3:1.8 netbsd-10-0-RC2:1.8 netbsd-10-0-RC1:1.8 netbsd-10:1.8.0.44 netbsd-10-base:1.8 netbsd-9-3-RELEASE:1.8 cjep_sun2x-base1:1.8 cjep_sun2x:1.8.0.42 cjep_sun2x-base:1.8 cjep_staticlib_x-base1:1.8 netbsd-9-2-RELEASE:1.8 cjep_staticlib_x:1.8.0.40 cjep_staticlib_x-base:1.8 netbsd-9-1-RELEASE:1.8 phil-wifi-20200421:1.8 phil-wifi-20200411:1.8 is-mlppp:1.8.0.38 is-mlppp-base:1.8 phil-wifi-20200406:1.8 netbsd-8-2-RELEASE:1.8 netbsd-9-0-RELEASE:1.8 netbsd-9-0-RC2:1.8 netbsd-9-0-RC1:1.8 phil-wifi-20191119:1.8 netbsd-9:1.8.0.36 netbsd-9-base:1.8 phil-wifi-20190609:1.8 netbsd-8-1-RELEASE:1.8 netbsd-8-1-RC1:1.8 pgoyette-compat-merge-20190127:1.8 pgoyette-compat-20190127:1.8 pgoyette-compat-20190118:1.8 pgoyette-compat-1226:1.8 pgoyette-compat-1126:1.8 pgoyette-compat-1020:1.8 pgoyette-compat-0930:1.8 pgoyette-compat-0906:1.8 netbsd-7-2-RELEASE:1.8 pgoyette-compat-0728:1.8 netbsd-8-0-RELEASE:1.8 phil-wifi:1.8.0.34 phil-wifi-base:1.8 pgoyette-compat-0625:1.8 netbsd-8-0-RC2:1.8 pgoyette-compat-0521:1.8 pgoyette-compat-0502:1.8 pgoyette-compat-0422:1.8 netbsd-8-0-RC1:1.8 pgoyette-compat-0415:1.8 pgoyette-compat-0407:1.8 pgoyette-compat-0330:1.8 pgoyette-compat-0322:1.8 pgoyette-compat-0315:1.8 netbsd-7-1-2-RELEASE:1.8 pgoyette-compat:1.8.0.32 pgoyette-compat-base:1.8 netbsd-7-1-1-RELEASE:1.8 matt-nb8-mediatek:1.8.0.30 matt-nb8-mediatek-base:1.8 perseant-stdc-iso10646:1.8.0.28 perseant-stdc-iso10646-base:1.8 netbsd-8:1.8.0.26 netbsd-8-base:1.8 prg-localcount2-base3:1.8 prg-localcount2-base2:1.8 prg-localcount2-base1:1.8 prg-localcount2:1.8.0.24 prg-localcount2-base:1.8 pgoyette-localcount-20170426:1.8 bouyer-socketcan-base1:1.8 pgoyette-localcount-20170320:1.8 netbsd-7-1:1.8.0.22 netbsd-7-1-RELEASE:1.8 netbsd-7-1-RC2:1.8 netbsd-7-nhusb-base-20170116:1.8 bouyer-socketcan:1.8.0.20 bouyer-socketcan-base:1.8 pgoyette-localcount-20170107:1.8 netbsd-7-1-RC1:1.8 pgoyette-localcount-20161104:1.8 netbsd-7-0-2-RELEASE:1.8 localcount-20160914:1.8 netbsd-7-nhusb:1.8.0.18 netbsd-7-nhusb-base:1.8 pgoyette-localcount-20160806:1.8 pgoyette-localcount-20160726:1.8 pgoyette-localcount:1.8.0.16 pgoyette-localcount-base:1.8 netbsd-7-0-1-RELEASE:1.8 netbsd-7-0:1.8.0.14 netbsd-7-0-RELEASE:1.8 netbsd-7-0-RC3:1.8 netbsd-7-0-RC2:1.8 netbsd-7-0-RC1:1.8 netbsd-5-2-3-RELEASE:1.2.2.1 netbsd-5-1-5-RELEASE:1.2 netbsd-6-0-6-RELEASE:1.7 netbsd-6-1-5-RELEASE:1.7 netbsd-7:1.8.0.12 netbsd-7-base:1.8 yamt-pagecache-base9:1.8 yamt-pagecache-tag8:1.7.4.1 netbsd-6-1-4-RELEASE:1.7 netbsd-6-0-5-RELEASE:1.7 tls-earlyentropy:1.8.0.10 tls-earlyentropy-base:1.8 riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.8 riastradh-drm2-base3:1.8 netbsd-6-1-3-RELEASE:1.7 netbsd-6-0-4-RELEASE:1.7 netbsd-5-2-2-RELEASE:1.2.2.1 netbsd-5-1-4-RELEASE:1.2 netbsd-6-1-2-RELEASE:1.7 netbsd-6-0-3-RELEASE:1.7 netbsd-5-2-1-RELEASE:1.2.2.1 netbsd-5-1-3-RELEASE:1.2 netbsd-6-1-1-RELEASE:1.7 riastradh-drm2-base2:1.8 riastradh-drm2-base1:1.8 riastradh-drm2:1.8.0.4 riastradh-drm2-base:1.8 netbsd-6-1:1.7.0.12 netbsd-6-0-2-RELEASE:1.7 netbsd-6-1-RELEASE:1.7 khorben-n900:1.8.0.8 netbsd-6-1-RC4:1.7 netbsd-6-1-RC3:1.7 agc-symver:1.8.0.6 agc-symver-base:1.8 netbsd-6-1-RC2:1.7 netbsd-6-1-RC1:1.7 yamt-pagecache-base8:1.8 netbsd-5-2:1.2.2.1.0.2 netbsd-6-0-1-RELEASE:1.7 yamt-pagecache-base7:1.8 netbsd-5-2-RELEASE:1.2.2.1 netbsd-5-2-RC1:1.2.2.1 matt-nb6-plus-nbase:1.7 yamt-pagecache-base6:1.8 netbsd-6-0:1.7.0.10 netbsd-6-0-RELEASE:1.7 netbsd-6-0-RC2:1.7 tls-maxphys:1.8.0.2 tls-maxphys-base:1.8 matt-nb6-plus:1.7.0.8 matt-nb6-plus-base:1.7 netbsd-6-0-RC1:1.7 yamt-pagecache-base5:1.8 yamt-pagecache-base4:1.8 netbsd-6:1.7.0.6 netbsd-6-base:1.7 netbsd-5-1-2-RELEASE:1.2 netbsd-5-1-1-RELEASE:1.2 yamt-pagecache-base3:1.7 yamt-pagecache-base2:1.7 yamt-pagecache:1.7.0.4 yamt-pagecache-base:1.7 cherry-xenmp:1.7.0.2 cherry-xenmp-base:1.7 bouyer-quota2-nbase:1.6 bouyer-quota2:1.6.0.2 bouyer-quota2-base:1.6 matt-mips64-premerge-20101231:1.6 matt-nb5-mips64-premerge-20101231:1.2.6.1 matt-nb5-pq3:1.2.0.10 matt-nb5-pq3-base:1.2 netbsd-5-1:1.2.0.8 netbsd-5-1-RELEASE:1.2 netbsd-5-1-RC4:1.2 matt-nb5-mips64-k15:1.2.6.1 netbsd-5-1-RC3:1.2 netbsd-5-1-RC2:1.2 netbsd-5-1-RC1:1.2 netbsd-5-0-2-RELEASE:1.2 matt-nb5-mips64-premerge-20091211:1.2 matt-premerge-20091211:1.5 matt-nb5-mips64-u2-k2-k4-k7-k8-k9:1.2 matt-nb4-mips64-k7-u2a-k9b:1.2 matt-nb5-mips64-u1-k1-k5:1.2 matt-nb5-mips64:1.2.0.6 netbsd-5-0-1-RELEASE:1.2 jym-xensuspend-nbase:1.3 netbsd-5-0:1.2.0.4 netbsd-5-0-RELEASE:1.2 netbsd-5-0-RC4:1.2 netbsd-5-0-RC3:1.2 netbsd-5-0-RC2:1.2 jym-xensuspend:1.3.0.2 jym-xensuspend-base:1.3 netbsd-5-0-RC1:1.2 netbsd-5:1.2.0.2 netbsd-5-base:1.2; locks; strict; comment @# @; 1.9 date 2024.02.04.05.43.05; author mrg; state Exp; branches; next 1.8; commitid pLXE208plwBRP4XE; 1.8 date 2012.03.29.18.35.11; author wiz; state Exp; branches 1.8.34.1; next 1.7; 1.7 date 2011.04.17.01.29.06; author mrg; state Exp; branches 1.7.4.1; next 1.6; 1.6 date 2010.06.30.03.28.01; author mrg; state Exp; branches; next 1.5; 1.5 date 2009.12.13.17.58.27; author snj; state Exp; branches; next 1.4; 1.4 date 2009.12.13.09.27.57; author mrg; state Exp; branches; next 1.3; 1.3 date 2009.01.13.17.52.32; author jmmv; state Exp; branches; next 1.2; 1.2 date 2008.10.27.07.22.22; author mrg; state Exp; branches 1.2.2.1 1.2.6.1; next 1.1; 1.1 date 2008.10.26.07.38.28; author mrg; state Exp; branches; next ; 1.8.34.1 date 2020.04.21.18.41.25; author martin; state dead; branches; next 1.8.34.2; commitid 86tA4aEmdr3VCh5C; 1.8.34.2 date 2020.04.21.19.37.52; author martin; state Exp; branches; next ; commitid x6IB64bYH9UmWh5C; 1.7.4.1 date 2012.04.17.00.01.40; author yamt; state Exp; branches; next ; 1.2.2.1 date 2011.01.06.05.19.55; author riz; state Exp; branches; next ; 1.2.6.1 date 2009.12.14.06.20.58; author mrg; state Exp; branches; next ; desc @@ 1.9 log @update my email address. @ text @$NetBSD: README,v 1.8 2012/03/29 18:35:11 wiz Exp $ Building multi-ABI libraries for NetBSD platforms. src/compat has a framework to (re)build the libraries shipped with NetBSD for a different ABI than the default for that platform. This allows 32-bit libraries for the amd64 and sparc64 ports, and enables the mips64 port to support all three of old-style 32-bit ("o32"), the new 32-bit (default, "n32", 64-bit CPU required) or the 64-bit ABI. The basic premise is to re-set $MAKEOBJDIR to fresh subdirectory underneath src/compat and rebuild the libraries with a different set of options. Each platform wanting support should create their port subdirectory directly in src/compat, and then one subdirectory in here for each ABI required, e.g., src/compat/amd64/i386 is where we build the 32-bit compat libraries for the amd64 port. In each of these subdirectories, a small Makefile and makefile fragment should exist. The Makefile should set BSD_MK_COMPAT_FILE to equal the fragment, and then include "../../compatsubdir.mk". E.g., amd64/i386/Makefile has: BSD_MK_COMPAT_FILE=${.CURDIR}/bsd.i386.mk .include "../../compatsubdir.mk" In the makefile fragment any changes to ABI flags are passed here and the MLIBDIR variable must be set to the subdirectory in /usr/lib where libraries for the ABI will be installed. There are a couple of helper Makefiles around. amd64/i386/bsd.i386.mk looks like: LD+= -m elf_i386 MLIBDIR= i386 LIBC_MACHINE_ARCH= ${MLIBDIR} COMMON_MACHINE_ARCH= ${MLIBDIR} KVM_MACHINE_ARCH= ${MLIBDIR} PTHREAD_MACHINE_ARCH= ${MLIBDIR} BFD_MACHINE_ARCH= ${MLIBDIR} CSU_MACHINE_ARCH= ${MLIBDIR} CRYPTO_MACHINE_CPU= ${MLIBDIR} LDELFSO_MACHINE_CPU= ${MLIBDIR} .include "${NETBSDSRCDIR}/compat/m32.mk" and the referenced m32.mk looks like: COPTS+= -m32 CPUFLAGS+= -m32 LDADD+= -m32 LDFLAGS+= -m32 MKDEPFLAGS+= -m32 .include "Makefile.compat" compatsubdir.mk holds the list of subdirectories (the libraries and ld.elf_so) to build with this ABI. archdirs.mk holds the list of subdirectories for each port. Makefile.compat has the basic framework to force the right paths for library and ld.elf_so linkage. It contains a hack to create subdirectories in the build that should be fixed. dirshack/Makefile is a hack to get objdirs created timely, and should be fixed in a better way. mrg@@eterna23.net december 2009 @ 1.8 log @Fix typos; wording. From patch by Bug Hunting. @ text @d1 1 a1 1 $NetBSD: README,v 1.7 2011/04/17 01:29:06 mrg Exp $ d71 1 a71 1 mrg@@eterna.com.au @ 1.8.34.1 log @Sync with HEAD @ text @d1 1 a1 1 $NetBSD: README,v 1.8 2012/03/29 18:35:11 wiz Exp $ @ 1.8.34.2 log @Ooops, restore accidently removed files from merge mishap @ text @@ 1.7 log @catch up with s/MAKEDIROBJPREFIX/MAKEOBJDIR/ changes in comments. @ text @d1 1 a1 1 $NetBSD: README,v 1.6 2010/06/30 03:28:01 mrg Exp $ d4 1 a4 1 Building multi- ABI libraries for NetBSD platforms. d18 1 a18 1 for each ABI required. e.g., src/compat/amd64/i386 is where we build d20 1 a20 1 subdirs, a small Makefile and makefile fragment should exist. The d22 1 a22 1 include "../../compatsubdir.mk" Eg, amd64/i386/Makefile has: d63 1 a63 1 library and ld.elf_so linkage. It contains a hack to create subdirs @ 1.7.4.1 log @sync with head @ text @d1 1 a1 1 $NetBSD: README,v 1.7 2011/04/17 01:29:06 mrg Exp $ d4 1 a4 1 Building multi-ABI libraries for NetBSD platforms. d18 1 a18 1 for each ABI required, e.g., src/compat/amd64/i386 is where we build d20 1 a20 1 subdirectories, a small Makefile and makefile fragment should exist. The d22 1 a22 1 include "../../compatsubdir.mk". E.g., amd64/i386/Makefile has: d63 1 a63 1 library and ld.elf_so linkage. It contains a hack to create subdirectories @ 1.6 log @update this to reality a little. @ text @d1 1 a1 1 $NetBSD: README,v 1.5 2009/12/13 17:58:27 snj Exp $ d14 1 a14 1 The basic premise is to re-set $MAKEOBJDIRPREFIX to fresh subdirectory @ 1.5 log @Fix a few typos. @ text @d1 1 a1 1 $NetBSD: README,v 1.4 2009/12/13 09:27:57 mrg Exp $ d22 1 a22 1 include "../../Makefile.common". Eg, amd64/i386/Makefile has: d26 1 a26 1 .include "../../Makefile.common" d44 1 a44 1 .include "${NETBSDSRCDIR}/compat/Makefile.m32" d46 1 a46 1 and the referenced Makefile.m32 looks like: d57 1 a57 1 Makefile.common holds the list of subdirectories (the libraries and d60 1 a60 1 Makefile.md_subdir holds the list of subdirectories for each port. @ 1.4 log @update this to reflect all the changes in src/compat version 2.0 @ text @d1 1 a1 1 $NetBSD: README,v 1.3 2009/01/13 17:52:32 jmmv Exp $ d9 1 a9 1 allow 32-bit libraries for the amd64 and sparc64 ports, and enables d19 1 a19 1 the 32-bit compat libraries for the amd64port. In each of these d31 1 a31 1 helper Makefile's around. amd64/i386/bsd.i386.mk looks like: @ 1.3 log @Fix typo. @ text @d1 1 a1 1 $NetBSD: README,v 1.2 2008/10/27 07:22:22 mrg Exp $ a2 3 This directory contains Makefile fragments that will build all of the NetBSD libraries in 32-bit mode and install them into /usr/lib/ and also install a /usr/libexec/ld.elf_so-. d4 1 a4 4 This is current only supported for the amd64 and sparc64 platforms, where is "i386" or "sparc" respectively. (It could be used to build MIPS o32 libraries on n32 system, but not both n32 and o32 on a n64 system. It only supports one extra target.) d7 5 a11 2 Most of the makefiles here were built with the "build-makefiles" script. The exceptions are lib/csu/Makefile and ld.elf_so/Makefile. d14 9 a22 7 The method used is the: - evaluate some local variables - switch .CURDIR - include original Makefile, - evaluate some variables - switch .CURDIR back that is used by crunchgen to build eg, installer media or /rescue. d24 1 d26 1 d28 4 a31 9 TODO: - some yacc issue -- libc, libipsec and libpcap need "make" run to generate headers properly, otherwise it complains about no way to get to foo.h. this is currently hacked by putting a rule "foo.h: foo.c" in the (generated) makefiles - there's an ugly hack to make libpam build correctly again the right libc. ld.elf_so has a similar (but less ugly hack) - not sure that /usr/lib/{i386,sparc}{,/i18n} are created properly yet d33 10 a42 1 Future work d44 29 a72 5 Ideally this should be able to handle any number of compat targets. Perhaps using a "force MAKEOBJDIR, and run-run make" solution will work, but my initial attempts got me no where. If not, perhaps build-makefiles could be expanded to be used at run-time in such a per-compat target obj-dir. @ 1.2 log @update this to match reality. @ text @d1 1 a1 1 $NetBSD: README,v 1.1 2008/10/26 07:38:28 mrg Exp $ d14 1 a14 1 The expections are lib/csu/Makefile and ld.elf_so/Makefile. @ 1.2.2.1 log @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 @ text @d1 1 a1 1 $NetBSD: README,v 1.6 2010/06/30 03:28:01 mrg Exp $ d3 3 d7 4 a10 1 Building multi- ABI libraries for NetBSD platforms. d13 2 a14 5 src/compat has a framework to (re)build the libraries shipped with NetBSD for a different ABI than the default for that platform. This allows 32-bit libraries for the amd64 and sparc64 ports, and enables the mips64 port to support all three of old-style 32-bit ("o32"), the new 32-bit (default, "n32", 64-bit CPU required) or the 64-bit ABI. d17 7 a23 9 The basic premise is to re-set $MAKEOBJDIRPREFIX to fresh subdirectory underneath src/compat and rebuild the libraries with a different set of options. Each platform wanting support should create their port subdirectory directly in src/compat, and then one subdirectory in here for each ABI required. e.g., src/compat/amd64/i386 is where we build the 32-bit compat libraries for the amd64 port. In each of these subdirs, a small Makefile and makefile fragment should exist. The Makefile should set BSD_MK_COMPAT_FILE to equal the fragment, and then include "../../compatsubdir.mk" Eg, amd64/i386/Makefile has: a24 1 BSD_MK_COMPAT_FILE=${.CURDIR}/bsd.i386.mk a25 1 .include "../../compatsubdir.mk" d27 9 a35 4 In the makefile fragment any changes to ABI flags are passed here and the MLIBDIR variable must be set to the subdirectory in /usr/lib where libraries for the ABI will be installed. There are a couple of helper Makefiles around. amd64/i386/bsd.i386.mk looks like: d37 1 a37 10 LD+= -m elf_i386 MLIBDIR= i386 LIBC_MACHINE_ARCH= ${MLIBDIR} COMMON_MACHINE_ARCH= ${MLIBDIR} KVM_MACHINE_ARCH= ${MLIBDIR} PTHREAD_MACHINE_ARCH= ${MLIBDIR} BFD_MACHINE_ARCH= ${MLIBDIR} CSU_MACHINE_ARCH= ${MLIBDIR} CRYPTO_MACHINE_CPU= ${MLIBDIR} LDELFSO_MACHINE_CPU= ${MLIBDIR} d39 5 a43 29 .include "${NETBSDSRCDIR}/compat/m32.mk" and the referenced m32.mk looks like: COPTS+= -m32 CPUFLAGS+= -m32 LDADD+= -m32 LDFLAGS+= -m32 MKDEPFLAGS+= -m32 .include "Makefile.compat" compatsubdir.mk holds the list of subdirectories (the libraries and ld.elf_so) to build with this ABI. archdirs.mk holds the list of subdirectories for each port. Makefile.compat has the basic framework to force the right paths for library and ld.elf_so linkage. It contains a hack to create subdirs in the build that should be fixed. dirshack/Makefile is a hack to get objdirs created timely, and should be fixed in a better way. mrg@@eterna.com.au december 2009 @ 1.2.6.1 log @merge the new src/compat build into the place it was actually born. this replaces the old src/compat with a method that re-traverses the library directories with a different set of flags, and is capable of building more than one compat ABI. @ text @d1 1 a1 1 $NetBSD$ d3 3 d7 4 a10 1 Building multi- ABI libraries for NetBSD platforms. d13 2 a14 5 src/compat has a framework to (re)build the libraries shipped with NetBSD for a different ABI than the default for that platform. This allow 32-bit libraries for the amd64 and sparc64 ports, and enables the mips64 port to support all three of old-style 32-bit ("o32"), the new 32-bit (default, "n32", 64-bit CPU required) or the 64-bit ABI. d17 7 a23 9 The basic premise is to re-set $MAKEOBJDIRPREFIX to fresh subdirectory underneath src/compat and rebuild the libraries with a different set of options. Each platform wanting support should create their port subdirectory directly in src/compat, and then one subdirectory in here for each ABI required. e.g., src/compat/amd64/i386 is where we build the 32-bit compat libraries for the amd64port. In each of these subdirs, a small Makefile and makefile fragment should exist. The Makefile should set BSD_MK_COMPAT_FILE to equal the fragment, and then include "../../Makefile.common". Eg, amd64/i386/Makefile has: a24 47 # $NetBSD$ BSD_MK_COMPAT_FILE=${.CURDIR}/bsd.i386.mk .include "../../Makefile.common" In the makefile fragment any changes to ABI flags are passed here and the MLIBDIR variable must be set to the subdirectory in /usr/lib where libraries for the ABI will be installed. There are a couple of helper Makefile's around. amd64/i386/bsd.i386.mk looks like: # $NetBSD$ LD+= -m elf_i386 MLIBDIR= i386 .include "${NETBSDSRCDIR}/compat/Makefile.m32" and the referenced Makefile.m32 looks like: # $NetBSD$ # # Makefile fragment to help implement a set of 'cc -m32' libraries. # COPTS+= -m32 CPUFLAGS+= -m32 LDADD+= -m32 LDFLAGS+= -m32 MKDEPFLAGS+= -m32 .include "Makefile.compat" Makefile.common holds the list of subdirectories (the libraries and ld.elf_so) to build with this ABI. Makefile.md_subdir holds the list of subdirectories for each port. Makefile.compat has the basic framework to force the right paths for library and ld.elf_so linkage. It contains a hack to create subdirs in the build that should be fixed. dirshack/Makefile is a hack to get objdirs created timely, and should be fixed in a better way. d28 16 a43 12 - fix MLIBDIR in ld.elf_so arch-subdirs to be generic since it now is: .if defined(MLIBDIR) CPPFLAGS+= -DRTLD_ARCH_SUBDIR=\"${MLIBDIR}\" .endif - check this part in ld.elf_so Makefile. it may be right now: # XXXX this needs to find the right one some how yet. CLIBOBJ!= cd ${NETBSDSRCDIR}/lib/libc && ${PRINTOBJDIR} mrg@@eterna.com.au december 2009 @ 1.1 log @build 32 bit compat libraries and ld.elf_so for amd64 and sparc64 builds. two issues remain: - LIBDPLIBS isn't working correctly, requiring hand-holding builds - libc, libipsec, and libpcap have yacc issues, also requiring hand holding ideally this will be replaced with a better method that can handle more than one compat target, but i can't get that working yet. see the README file for mroe details. @ text @d1 1 a1 1 $NetBSD$ a27 4 - currently, LIBDPLIBS evaluation gets the src/lib directories not the src/compat/lib ones, and this causes build-time link failures. it's work-around-able by running "nbmake-foo install" manually in each library not found. d30 2 a31 1 no way to get to foo.h. d33 3 a35 2 right libc. ld.elf_so has a similar (but less ugly hack.) @