summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-10-31 18:20:21 +0000
committerEric Andersen <andersen@codepoet.org>2002-10-31 18:20:21 +0000
commit6737908f74ff566748864548cf35bb1da8e64af6 (patch)
tree6eeafda4548f49d960e1b597c880a810a08a66f0
parentc734e7ca57f520e55236b21eaef16ac40099a378 (diff)
Ok, this commit is _huge_ and its gonna change the world. I've
been working on a new config system on and off for about 6 months now, but I've never been fully satisfied. Well, I'm finally am happy with the new config system, so here it is. This completely removes the old uClibc configuration system, and replaces it with an entirely new system based on LinuxKernelConf, from http://www.xs4all.nl/~zippel/lc/ As it turns out, Linus has just merged LinuxKernelConf into Linux 2.5.45, so it looks like I made the right choice. I have thus far updated only x86. I'll be updating the other architectures shortly. -Erik
-rw-r--r--.cvsignore1
-rw-r--r--Makefile221
-rw-r--r--Rules.mak53
-rw-r--r--extra/Configs/Config.i386370
-rw-r--r--extra/Configs/Config.i386.default73
-rw-r--r--extra/Configs/Config.in260
-rw-r--r--extra/config/Makefile83
-rwxr-xr-xextra/config/confbin0 -> 163714 bytes
-rw-r--r--extra/config/conf.c565
-rw-r--r--extra/config/confdata.c370
-rw-r--r--extra/config/expr.c1054
-rw-r--r--extra/config/expr.h242
-rw-r--r--extra/config/lex.zconf.c3270
-rw-r--r--extra/config/lex.zconf.c_shipped3270
-rw-r--r--extra/config/lkc.h106
-rw-r--r--extra/config/lkc_defs.h38
-rw-r--r--extra/config/lkc_proto.h38
-rw-r--r--extra/config/lxdialog/BIG.FAT.WARNING4
-rw-r--r--extra/config/lxdialog/Makefile51
-rw-r--r--extra/config/lxdialog/checklist.c369
-rw-r--r--extra/config/lxdialog/colors.h161
-rw-r--r--extra/config/lxdialog/dialog.h184
-rw-r--r--extra/config/lxdialog/inputbox.c240
-rwxr-xr-xextra/config/lxdialog/lxdialogbin0 -> 34594 bytes
-rw-r--r--extra/config/lxdialog/lxdialog.c226
-rw-r--r--extra/config/lxdialog/menubox.c443
-rw-r--r--extra/config/lxdialog/msgbox.c85
-rw-r--r--extra/config/lxdialog/textbox.c556
-rw-r--r--extra/config/lxdialog/util.c359
-rw-r--r--extra/config/lxdialog/yesno.c118
-rwxr-xr-xextra/config/mconfbin0 -> 178758 bytes
-rw-r--r--extra/config/mconf.c711
-rw-r--r--extra/config/menu.c309
-rw-r--r--extra/config/symbol.c618
-rw-r--r--extra/config/zconf.l323
-rw-r--r--extra/config/zconf.tab.c1866
-rw-r--r--extra/config/zconf.tab.c_shipped1866
-rw-r--r--extra/config/zconf.tab.h53
-rw-r--r--extra/config/zconf.tab.h_shipped53
-rw-r--r--extra/config/zconf.y651
-rw-r--r--extra/gcc-uClibc/Makefile12
-rw-r--r--extra/gcc-uClibc/gcc-uClibc.c2
-rw-r--r--extra/locale/Makefile2
-rw-r--r--include/features.h10
-rw-r--r--include/sys/cdefs.h2
-rw-r--r--ldso/Makefile4
-rw-r--r--ldso/ldso/Makefile2
-rw-r--r--libc/inet/Makefile2
-rw-r--r--libc/inet/rpc/Makefile15
-rw-r--r--libc/misc/Makefile6
-rw-r--r--libc/misc/dirent/alphasort64.c4
-rw-r--r--libc/misc/dirent/readdir64.c4
-rw-r--r--libc/misc/dirent/readdir64_r.c4
-rw-r--r--libc/misc/dirent/scandir64.c4
-rw-r--r--libc/misc/glob/glob64.c2
-rw-r--r--libc/misc/internals/Makefile2
-rw-r--r--libc/misc/internals/tempname.c2
-rw-r--r--libc/misc/locale/Makefile4
-rw-r--r--libc/misc/statfs/Makefile2
-rw-r--r--libc/misc/statfs/fstatfs64.c4
-rw-r--r--libc/misc/statfs/fstatvfs64.c2
-rw-r--r--libc/misc/statfs/statfs64.c2
-rw-r--r--libc/misc/statfs/statvfs64.c2
-rw-r--r--libc/misc/time/Makefile2
-rw-r--r--libc/pwd_grp/Makefile2
-rw-r--r--libc/stdio/Makefile25
-rw-r--r--libc/stdio/tmpfile.c2
-rw-r--r--libc/stdlib/Makefile14
-rw-r--r--libc/stdlib/getpt.c18
-rw-r--r--libc/stdlib/grantpt.c8
-rw-r--r--libc/stdlib/ptsname.c10
-rw-r--r--libc/string/Makefile2
-rw-r--r--libc/sysdeps/linux/common/Makefile4
-rw-r--r--libc/sysdeps/linux/common/bits/posix_opt.h4
-rw-r--r--libc/sysdeps/linux/common/bits/uClibc_stdio.h12
-rw-r--r--libc/sysdeps/linux/common/creat64.c4
-rw-r--r--libc/sysdeps/linux/common/ftruncate64.c4
-rw-r--r--libc/sysdeps/linux/common/getdirname.c4
-rw-r--r--libc/sysdeps/linux/common/getrlimit64.c2
-rw-r--r--libc/sysdeps/linux/common/initfini.c2
-rw-r--r--libc/sysdeps/linux/common/llseek.c2
-rw-r--r--libc/sysdeps/linux/common/mmap64.c4
-rw-r--r--libc/sysdeps/linux/common/open64.c4
-rw-r--r--libc/sysdeps/linux/common/pread_write.c20
-rw-r--r--libc/sysdeps/linux/common/setrlimit64.c2
-rw-r--r--libc/sysdeps/linux/common/syscalls.c24
-rw-r--r--libc/sysdeps/linux/common/truncate64.c4
-rw-r--r--libc/sysdeps/linux/cris/Makefile2
-rw-r--r--libc/sysdeps/linux/h8300/Makefile2
-rw-r--r--libc/sysdeps/linux/h8300/crt0.S2
-rw-r--r--libc/sysdeps/linux/h8300/vfork.S2
-rw-r--r--libc/sysdeps/linux/i960/README4
-rw-r--r--libc/sysdeps/linux/m68k/Makefile8
-rw-r--r--libc/sysdeps/linux/m68k/clone.S2
-rw-r--r--libc/sysdeps/linux/m68k/crt0.S2
-rw-r--r--libc/sysdeps/linux/m68k/vfork.S2
-rw-r--r--libc/sysdeps/linux/powerpc/Makefile6
-rw-r--r--libc/sysdeps/linux/sh/sysdep.h6
-rw-r--r--libc/unistd/Makefile2
-rw-r--r--libc/unistd/daemon.c5
-rw-r--r--libc/unistd/fpathconf.c2
-rw-r--r--libc/unistd/pathconf.c2
-rw-r--r--libm/Makefile4
-rw-r--r--libm/powerpc/Makefile4
-rw-r--r--libpthread/Makefile6
-rw-r--r--libpthread/linuxthreads/attr.c2
-rw-r--r--libpthread/linuxthreads/weaks.c2
-rw-r--r--libpthread/linuxthreads/wrapsyscall.c8
-rw-r--r--libutil/Makefile2
109 files changed, 19093 insertions, 518 deletions
diff --git a/.cvsignore b/.cvsignore
index 19c5ad2af..49273e8e3 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -9,3 +9,4 @@ lib
Config
_install
build-stamp
+.config*
diff --git a/Makefile b/Makefile
index c5f69e132..a23e5727a 100644
--- a/Makefile
+++ b/Makefile
@@ -22,29 +22,27 @@
# other sundry sources. Files within this library are copyright by their
# respective copyright holders.
-#--------------------------------------------------------
-#
-#There are a number of configurable options in "Config"
-#
-#--------------------------------------------------------
+#--------------------------------------------------------------
+# You shouldn't need to mess with anything beyond this point...
+#--------------------------------------------------------------
+noconfig_targets := menuconfig config oldconfig randconfig \
+ defconfig allyesconfig allnoconfig clean distclean \
+ release tags TAGS
TOPDIR=./
include Rules.mak
DIRS = extra ldso libc libcrypt libresolv libutil libm libpthread
-all: headers uClibc_config subdirs shared utils finished
+ifdef include-config
-Config:
- @echo
- @echo "You didn't read the README, did you... =)"
- @echo "Choose a configuration file in extras/Config/ and then run"
- @echo " ln -s ./extra/Configs/Config.<arch> ./Config"
- @echo
- @exit 1
+all: headers subdirs shared utils finished
+
+# In this section, we need .config
+-include .config.cmd
shared:
-ifeq ($(strip $(HAVE_SHARED)),true)
+ifeq ($(strip $(HAVE_SHARED)),y)
@$(MAKE) -C libc shared
@$(MAKE) -C ldso shared
@$(MAKE) -C libcrypt shared
@@ -67,7 +65,7 @@ finished: shared
# Target for uClinux distro
#
romfs:
-ifeq ($(strip $(HAVE_SHARED)),true)
+ifeq ($(strip $(HAVE_SHARED)),y)
install -d $(ROMFSDIR)/lib
install -m 644 lib/lib*-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so \
$(ROMFSDIR)/lib
@@ -79,13 +77,18 @@ ifeq ($(strip $(HAVE_SHARED)),true)
fi;
endif
-headers: dummy
+include/bits/uClibc_config.h: .config
+ rm -rf include/bits
+ mkdir -p include/bits
+ @./extra/config/conf -o extra/Configs/Config.$(TARGET_ARCH)
+
+headers: include/bits/uClibc_config.h
rm -f include/asm;
- @if [ $(TARGET_ARCH) = "powerpc" ];then \
+ @if [ "$(TARGET_ARCH)" = "powerpc" ];then \
ln -fs $(KERNEL_SOURCE)/include/asm-ppc include/asm; \
- elif [ $(TARGET_ARCH) = "mips" ];then \
+ elif [ "$(TARGET_ARCH)" = "mips" ];then \
ln -fs $(KERNEL_SOURCE)/include/asm-mips include/asm; \
- elif [ $(TARGET_ARCH) = "mipsel" ];then \
+ elif [ "$(TARGET_ARCH)" = "mipsel" ];then \
ln -fs $(KERNEL_SOURCE)/include/asm-mips include/asm; \
cd $(shell pwd)/libc/sysdeps/linux; \
ln -fs mips mipsel; \
@@ -93,10 +96,10 @@ headers: dummy
ln -fs mips mipsel; \
cd $(shell pwd)/libpthread/linuxthreads/sysdeps; \
ln -fs mips mipsel; \
- elif [ $(TARGET_ARCH) = "cris" ];then \
+ elif [ "$(TARGET_ARCH)" = "cris" ];then \
ln -fs $(KERNEL_SOURCE)/include/asm-cris include/asm; \
else \
- if [ $(HAS_MMU) != "true" ]; then \
+ if [ "$(UCLIBC_HAS_MMU)" != "y" ]; then \
if [ -d $(KERNEL_SOURCE)/include/asm-$(TARGET_ARCH)nommu ] ; then \
ln -fs $(KERNEL_SOURCE)/include/asm-$(TARGET_ARCH)nommu include/asm;\
else \
@@ -110,16 +113,14 @@ headers: dummy
set -e; \
echo " "; \
echo "The path '$(KERNEL_SOURCE)/include/asm' doesn't exist."; \
- echo "I bet you didn't set KERNEL_SOURCE, TARGET_ARCH or HAS_MMU in \`Config'"; \
- echo "correctly. Please edit \`Config' and fix these settings."; \
+ echo "I bet you didn't set KERNEL_SOURCE, TARGET_ARCH or UCLIBC_HAS_MMU"; \
+ echo "correctly when you configured uClibc. Please fix these settings."; \
echo " "; \
false; \
fi;
rm -f include/linux include/scsi
ln -fs $(KERNEL_SOURCE)/include/linux include/linux
ln -fs $(KERNEL_SOURCE)/include/scsi include/scsi
- rm -rf include/bits
- mkdir -p include/bits
@cd include/bits; \
set -e; \
for i in `ls ../../libc/sysdeps/linux/common/bits/*.h` ; do \
@@ -146,97 +147,6 @@ headers: dummy
TOPDIR=. CC=$(CC) /bin/sh extra/scripts/gen_bits_syscall_h.sh > include/bits/sysnum.h
$(MAKE) -C libc/sysdeps/linux/$(TARGET_ARCH) headers
-uClibc_config: Makefile Config
- @echo "/* WARNING!!! AUTO-GENERATED FILE!!! DO NOT EDIT!!! */" > include/bits/uClibc_config.h
- @echo "#if !defined __FEATURES_H && !defined __need_uClibc_config_h" >> include/bits/uClibc_config.h
- @echo "#error Never include <bits/uClibc_config.h> directly; use <features.h> instead." >> include/bits/uClibc_config.h
- @echo "#endif" >> include/bits/uClibc_config.h
- @echo "#define __UCLIBC_MAJOR__ $(MAJOR_VERSION)" >> include/bits/uClibc_config.h
- @echo "#define __UCLIBC_MINOR__ $(MINOR_VERSION)" >> include/bits/uClibc_config.h
- @echo "#define __UCLIBC_SUBLEVEL__ $(SUBLEVEL)" >> include/bits/uClibc_config.h
- @echo "#define linux 1" >> include/bits/uClibc_config.h
- @echo "#define __linux__ 1" >> include/bits/uClibc_config.h
- @if [ "$(INCLUDE_IPV6)" = "true" ] ; then \
- echo "#define __UCLIBC_HAS_IPV6__ 1" >> include/bits/uClibc_config.h ; \
- else \
- echo "#undef __UCLIBC_HAS_IPV6__" >> include/bits/uClibc_config.h ; \
- fi
- @if [ "$(HAS_MMU)" = "true" ] ; then \
- echo "#define __UCLIBC_HAS_MMU__ 1" >> include/bits/uClibc_config.h ; \
- else \
- echo "For now we make the assumption that a linux system without an"; \
- echo "MMU must be uClinux, and must have a broken munmap (both"; \
- echo "assumptions are a bit dodgy, but can be changed in the future)."; \
- echo "#undef __UCLIBC_HAS_MMU__" >> include/bits/uClibc_config.h ; \
- echo "#define __UCLIBC_UCLINUX_BROKEN_MUNMAP__ 1" >> include/bits/uClibc_config.h ; \
- fi
- @if [ "$(HAS_FLOATING_POINT)" = "true" ] ; then \
- echo "#define __UCLIBC_HAS_FLOATS__ 1" >> include/bits/uClibc_config.h ; \
- else \
- echo "#undef __UCLIBC_HAS_FLOATS__" >> include/bits/uClibc_config.h ; \
- fi
- @if [ "$(HAS_LOCALE)" = "true" ] ; then \
- echo "#define __UCLIBC_HAS_LOCALE__ 1" >> include/bits/uClibc_config.h ; \
- else \
- echo "#undef __UCLIBC_HAS_LOCALE__" >> include/bits/uClibc_config.h ; \
- fi
- @if [ "$(HAS_WCHAR)" = "true" ] ; then \
- echo "#define __UCLIBC_HAS_WCHAR__ 1" >> include/bits/uClibc_config.h ; \
- else \
- echo "#undef __UCLIBC_HAS_WCHAR__" >> include/bits/uClibc_config.h ; \
- fi
- @if [ "$(HAVE_ELF)" = "false" ] ; then \
- echo "#undef HAVE_ELF" >> include/bits/uClibc_config.h ; \
- else \
- echo "#define HAVE_ELF 1" >> include/bits/uClibc_config.h ; \
- fi
- @if [ "$(HAVE_SHARED)" = "false" ] ; then \
- echo "#undef HAVE_SHARED" >> include/bits/uClibc_config.h ; \
- else \
- echo "#define HAVE_SHARED 1" >> include/bits/uClibc_config.h ; \
- fi
- @if [ "$(TARGET_ARCH)" = "sh" ] ; then \
- echo "#define NO_UNDERSCORES 1" >> include/bits/uClibc_config.h ; \
- else \
- echo "#undef NO_UNDERSCORES" >> include/bits/uClibc_config.h ; \
- fi
- @if [ "$(INCLUDE_RPC)" = "true" ] ; then \
- echo "#define __UCLIBC_HAS_RPC__ 1" >> include/bits/uClibc_config.h ; \
- else \
- echo "#undef __UCLIBC_HAS_RPC__" >> include/bits/uClibc_