]> Zhao Yanbai Git Server - minix.git/commitdiff
Simplify ELF library build logic
authorArun Thomas <arun@minix3.org>
Tue, 28 Jun 2011 15:19:10 +0000 (17:19 +0200)
committerArun Thomas <arun@minix3.org>
Tue, 28 Jun 2011 15:27:50 +0000 (17:27 +0200)
-Remove obsolete clang-libraries and gnu-libraries targets
-Buildworld now builds elf-libraries as well

Makefile
docs/UPDATING
lib/Makefile
lib/clang_build.sh [deleted file]
lib/elf_build.sh
lib/elf_build_base.sh [deleted file]
lib/gnu_build.sh [deleted file]
share/mk/bsd.own.mk
share/mk/sys.mk

index 7d075423396efc0c7a670861c89d5b69c4a6d603..663660e94c436228d58883fec8d85ff23d130c70 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -13,17 +13,11 @@ usage:
        @echo " make world         # Compile everything (libraries & commands)"
        @echo " make includes      # Install include files from src/"
        @echo " make libraries     # Compile and install libraries (ack)"
-.ifdef MINIX_GENERATE_ELF
        @echo " make elf-libraries # Compile and install gcc/clang elf libs"
-.endif
        @echo " make commands      # Compile all, commands, but don't install"
        @echo " make install       # Compile and install commands"
        @echo " make depend        # Generate required .depend files"
        @echo " make gnu-includes  # Install include files for GCC"
-.ifndef MINIX_GENERATE_ELF
-       @echo " make gnu-libraries # Compile and install libraries for GCC"
-       @echo " make clang-libraries # Compile and install libraries for GCC with clang"
-.endif
        @echo " make clean         # Remove all compiler results"
        @echo "" 
        @echo "Run 'make' in tools/ to create a new MINIX configuration." 
@@ -37,19 +31,7 @@ usage:
 # 'make install' target.
 # 
 # etcfiles has to be done first.
-.ifdef MINIX_GENERATE_ELF
-world: mkfiles includes depend libraries elf-libraries install etcforce 
-.else
-.if ${COMPILER_TYPE} == "ack"
-world: mkfiles includes depend libraries install etcforce
-.elif ${COMPILER_TYPE} == "gnu"
-.if ${OBJECT_FMT} == "a.out"
-world: mkfiles includes depend gnu-libraries install etcforce
-.elif ${OBJECT_FMT} == "ELF"
-world: mkfiles elf-includes depend elf-libraries install etcforce
-.endif
-.endif
-.endif
+world: mkfiles includes depend libraries elf-libraries install etcforce
 
 mkfiles:
        make -C share/mk install
@@ -63,29 +45,12 @@ includes:
 libraries: includes
        $(MAKE) -C lib build_ack
 
-MKHEADERS411=/usr/gnu/libexec/gcc/i386-pc-minix/4.1.1/install-tools/mkheaders
-MKHEADERS443=/usr/gnu/libexec/gcc/i686-pc-minix/4.4.3/install-tools/mkheaders
 MKHEADERS443_PKGSRC=/usr/pkg/gcc44/libexec/gcc/i686-pc-minix/4.4.3/install-tools/mkheaders
 gnu-includes: includes
-       SHELL=/bin/sh; if [ -f $(MKHEADERS411) ] ; then sh -e $(MKHEADERS411) ; fi
-       SHELL=/bin/sh; if [ -f $(MKHEADERS443) ] ; then sh -e $(MKHEADERS443) ; fi
        SHELL=/bin/sh; if [ -f $(MKHEADERS443_PKGSRC) ] ; then sh -e $(MKHEADERS443_PKGSRC) ; fi
 
-.ifndef MINIX_GENERATE_ELF
-gnu-libraries: includes #gnu-includes
-       $(MAKE) -C lib build_gnu
-
-clang-libraries: includes
-       $(MAKE) -C lib build_clang
-.endif
-
-.ifdef MINIX_GENERATE_ELF
 elf-libraries: includes
-       $(MAKE) -C lib build_elf_base
-.else
-elf-libraries: elf-includes
        $(MAKE) -C lib build_elf
-.endif
 
 commands: includes libraries
        $(MAKE) -C commands all
index c883adcd2f5d72f177d9972b26f2a24d1907f896..81a5b95d0ad0da46ca82d8df4dcc9a6de8d31199 100644 (file)
@@ -1,3 +1,8 @@
+20110628:
+       Since buildworld will also build the elf-libraries, you
+       must follow the process in
+       http://wiki.minix3.org/en/UsersGuide/ELFSwitch
+
 20110624:
        (Next release bumped to MINIX 3.2.0.)
        ELF support in the base system. /usr/lib libraries
index 9a1ff44886c4a2538d009eacb0f8af2905ad2011..2f174de356a42156d5cc6ac5b01779cca4e4d9e0 100644 (file)
@@ -33,18 +33,10 @@ SUBDIR+= libend
 build_ack:
        sh ack_build.sh obj depend all install
 
-.if defined(MINIX_GENERATE_ELF)
-build_elf_base:
-       sh elf_build_base.sh obj depend all install
-.else
-build_gnu:
-       sh gnu_build.sh obj depend all install
-.endif
+build_elf:
+       sh elf_build.sh obj depend all install
 
 clean_all:
        sh ack_build.sh clean
-       sh clang_build.sh clean
-       sh gnu_build.sh clean
-       sh elf_build_base.sh clean
        sh elf_build.sh clean
 
diff --git a/lib/clang_build.sh b/lib/clang_build.sh
deleted file mode 100755 (executable)
index 25594d7..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-
-export CC=clang
-export COMPILER_TYPE=gnu
-export PATH=$PATH:/usr/pkg/bin:/usr/gnu_cross/bin
-export MAKEOBJDIR=obj-elf-clang
-export NBSD_LIBC=${NBSD_LIBC}
-
-make $@
index 9ced7036adfcf18061837842564c5deb50b0e54b..b0cf857eecd2fb6c93378b1466ca7d7d66747b2c 100755 (executable)
@@ -1,16 +1,12 @@
 #!/bin/sh
 
-# This file is obsolete and is only useful to 'clean' its objects.
+set -e
 
-export CC=i386-pc-minix3-gcc
+export CC=clang
 export COMPILER_TYPE=gnu
-export MAKEOBJDIR=obj-elf
-export PATH=$PATH:/usr/gnu_cross/bin
-export NBSD_LIBC=${NBSD_LIBC}
+export PATH=$PATH:/usr/pkg/bin
 
-if [ "$@" != clean ]
-then   echo "$0: Unexpected arguments $@"
-       exit 1
-fi
-
-make $@
+export MAKEOBJDIR=obj-elfbase-nbsd
+make $@ NBSD_LIBC=yes
+export MAKEOBJDIR=obj-elfbase
+make $@ NBSD_LIBC=no
diff --git a/lib/elf_build_base.sh b/lib/elf_build_base.sh
deleted file mode 100755 (executable)
index b0cf857..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-
-set -e
-
-export CC=clang
-export COMPILER_TYPE=gnu
-export PATH=$PATH:/usr/pkg/bin
-
-export MAKEOBJDIR=obj-elfbase-nbsd
-make $@ NBSD_LIBC=yes
-export MAKEOBJDIR=obj-elfbase
-make $@ NBSD_LIBC=no
diff --git a/lib/gnu_build.sh b/lib/gnu_build.sh
deleted file mode 100755 (executable)
index 6a70cef..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-
-export CC=gcc
-export PATH=$PATH:/usr/pkg/bin
-
-export MAKEOBJDIR=obj-gnu-nbsd
-make $@ NBSD_LIBC=yes
-export MAKEOBJDIR=obj-gnu
-make $@ NBSD_LIBC=no
index 198eddfe51015c01e847f96722d708e8216c886a..f90077df19d20084af73e5dc747b5b526979da15 100644 (file)
@@ -535,7 +535,7 @@ DEBUGMODE?= ${NONBINMODE}
 # All platforms are ELF.
 #
 #OBJECT_FMT=   ELF
-.if defined(MINIX_GENERATE_ELF) && ${COMPILER_TYPE} == "gnu"
+.if ${COMPILER_TYPE} == "gnu"
 OBJECT_FMT=    ELF
 .else
 OBJECT_FMT=    a.out
index 3bdb578215b2ae69b58b9669d15d016d6ffb6645..e935aca12fbc88a5d070120bc3ca4dcd76d04f4a 100644 (file)
@@ -238,11 +238,6 @@ COMPILER_TYPE=gnu
 AR?=   ar
 .endif
 
-.if exists(/usr/pkg/i386-pc-minix/lib/ldscripts/elf_i386_minix.x)      \
-       && exists(/usr/pkg/lib/clang/2.9)
-MINIX_GENERATE_ELF=yes
-.endif
-
 # Set NBSD_LIBC to either "yes" or "no".
 .if !defined(NBSD) || (${NBSD} == "no") \
     || !defined(COMPILER_TYPE) || (${COMPILER_TYPE} == "ack")