-ln -s $sbcl_arch-arch.h target-arch.h
-ln -s $sbcl_arch-lispregs.h target-lispregs.h
-case `uname` in
- Linux)
- printf ' :linux' >> $ltf
- sbcl_os="linux"
- if [ $sbcl_arch = "x86-64" ]; then
- ln -s Config.x86_64-linux Config
- else
- ln -s Config.$sbcl_arch-linux Config
- fi
- ln -s $sbcl_arch-linux-os.h target-arch-os.h
- ln -s linux-os.h target-os.h
- ;;
- OSF1)
- # it's changed name twice since it was called OSF/1: clearly
- # the marketers forgot to tell the engineers about Digital Unix
- # _or_ OSF/1 ...
- printf ' :osf1' >> $ltf
- sbcl_os="osf1"
- ln -s Config.$sbcl_arch-osf1 Config
- ln -s $sbcl_arch-osf1-os.h target-arch-os.h
- ln -s osf1-os.h target-os.h
- ;;
- *BSD)
- printf ' :bsd' >> $ltf
- ln -s $sbcl_arch-bsd-os.h target-arch-os.h
- ln -s bsd-os.h target-os.h
- case `uname` in
- FreeBSD)
- printf ' :freebsd' >> $ltf
- sbcl_os="freebsd"
- ln -s Config.$sbcl_arch-freebsd Config
- ;;
- OpenBSD)
- printf ' :openbsd' >> $ltf
- sbcl_os="openbsd"
- ln -s Config.$sbcl_arch-openbsd Config
- ;;
- NetBSD)
+link_or_copy $sbcl_arch-arch.h target-arch.h
+link_or_copy $sbcl_arch-lispregs.h target-lispregs.h
+case "$sbcl_os" in
+ linux)
+ printf ' :elf' >> $ltf
+ printf ' :linux' >> $ltf
+
+ # If you add other platforms here, don't forget to edit
+ # src/runtime/Config.foo-linux too.
+ if [ $sbcl_arch = "x86" ]; then
+ printf ' :largefile' >> $ltf
+ fi
+
+ if [ $sbcl_arch = "x86-64" ]; then
+ link_or_copy Config.x86_64-linux Config
+ else
+ link_or_copy Config.$sbcl_arch-linux Config
+ fi
+ link_or_copy $sbcl_arch-linux-os.h target-arch-os.h
+ link_or_copy linux-os.h target-os.h
+ ;;
+ osf1)
+ printf ' :elf' >> $ltf
+ printf ' :osf1' >> $ltf
+ link_or_copy Config.$sbcl_arch-osf1 Config
+ link_or_copy $sbcl_arch-osf1-os.h target-arch-os.h
+ link_or_copy osf1-os.h target-os.h
+ ;;
+ *bsd)
+ printf ' :bsd' >> $ltf
+ link_or_copy $sbcl_arch-bsd-os.h target-arch-os.h
+ link_or_copy bsd-os.h target-os.h
+ case "$sbcl_os" in
+ freebsd)
+ printf ' :elf' >> $ltf
+ printf ' :freebsd' >> $ltf
+ printf ' :sb-pthread-futex' >> $ltf
+ if [ $sbcl_arch = "x86" ]; then
+ printf ' :restore-tls-segment-register-from-tls' >> $ltf
+ fi
+ link_or_copy Config.$sbcl_arch-freebsd Config
+ ;;
+ openbsd)
+ printf ' :elf' >> $ltf
+ printf ' :openbsd' >> $ltf
+ link_or_copy Config.$sbcl_arch-openbsd Config
+ ;;
+ netbsd)