diff options
author | Colin Guthrie <colin@mageia.org> | 2013-10-19 19:17:28 +0100 |
---|---|---|
committer | Colin Guthrie <colin@mageia.org> | 2013-10-29 20:25:59 +0000 |
commit | 4f1bb300b5488d0d36fafc53ebb0969e51b44b8a (patch) | |
tree | b8ad3db5d167512ba119169061e8fc408989e508 /mdk-stage1 | |
parent | acc1cc950e31bd02fda968bb6c40f85efa7bc3a2 (diff) | |
download | drakx-4f1bb300b5488d0d36fafc53ebb0969e51b44b8a.tar drakx-4f1bb300b5488d0d36fafc53ebb0969e51b44b8a.tar.gz drakx-4f1bb300b5488d0d36fafc53ebb0969e51b44b8a.tar.bz2 drakx-4f1bb300b5488d0d36fafc53ebb0969e51b44b8a.tar.xz drakx-4f1bb300b5488d0d36fafc53ebb0969e51b44b8a.zip |
stage1: Switch to a shared stage1.
Previously we would create a static stage1 for the installer, but as
a dracut based initrd already includes glibc, there is very little
advantage in this small, statically linked version.
As a side note, it seems that if the initrd contains a /etc/modprobe.d/
folder (which can be the case with dracut) then dietlibc seems
to return a ENOENT when calling readdir_r() on that folder
(via the libkmod-config.c code).
Diffstat (limited to 'mdk-stage1')
-rw-r--r-- | mdk-stage1/Makefile | 14 | ||||
-rw-r--r-- | mdk-stage1/Makefile.common | 13 | ||||
-rw-r--r-- | mdk-stage1/NEWS | 4 |
3 files changed, 17 insertions, 14 deletions
diff --git a/mdk-stage1/Makefile b/mdk-stage1/Makefile index ddb5cfda1..b8fcf0f2b 100644 --- a/mdk-stage1/Makefile +++ b/mdk-stage1/Makefile @@ -70,11 +70,14 @@ INITOBJS = $(subst .c,.o,$(INITSRC)) #- frontends NEWT_FRONTEND_SRC = newt-frontend.c +ifeq (DIETLIBC, $(L)) NEWT_FRONTEND_LIBS = libnewt.a libslang.a +else +NEWT_FRONTEND_LIBS = -lnewt -lslang +endif STDIO_FRONTEND_SRC = stdio-frontend.c STDIO_FRONTEND_LIBS = -STDIO_FRONTEND_LIBS = FRONTEND_OBJS = $(subst .c,.o,$($(F)_FRONTEND_SRC)) @@ -84,20 +87,17 @@ else FRONTEND_LINK = $(FRONTEND_OBJS) $($(F)_FRONTEND_LIBS) endif -STAGE1_STATIC_LIBS = -STAGE1_STATIC_USR_LIBS = libz.a libldetect.a libkmod.a libpci.a liblzma.a libsysfs.a -STAGE1_OWN_LIBS = ifeq (DIETLIBC, $(L)) -STAGE1_OWN_LIBS = $(patsubst %,/usr/lib/dietlibc/lib-$(ARCH)/%,$(STAGE1_STATIC_USR_LIBS) $(STAGE1_STATIC_LIBS)) +STAGE1_OWN_LIBS = $(patsubst %,/usr/lib/dietlibc/lib-$(ARCH)/%,libz.a libldetect.a libkmod.a libpci.a liblzma.a libsysfs.a) else -STAGE1_OWN_LIBS = $(patsubst %,/usr/$(LIB)/%,$(STAGE1_STATIC_USR_LIBS)) $(patsubst %,/$(LIB)/%,$(STAGE1_STATIC_LIBS)) +STAGE1_OWN_LIBS = -lz -lldetect -lkmod -lpci -llzma -lsysfs endif ifeq (DIETLIBC, $(L)) STAGE1_NETWORK_LIBS = /usr/lib/dietlibc/lib-$(ARCH)/librpc.a else -STAGE1_NETWORK_LIBS = /usr/$(LIB)/libresolv.a +STAGE1_NETWORK_LIBS = -lresolv endif #- stage1 itself diff --git a/mdk-stage1/Makefile.common b/mdk-stage1/Makefile.common index 34c010905..d225da69e 100644 --- a/mdk-stage1/Makefile.common +++ b/mdk-stage1/Makefile.common @@ -28,12 +28,12 @@ F = NEWT endif # diet libc syscalls are broken on mips -ifneq (mips, $(ARCH)) -# diet libc eabi support is mostly broken -ifneq (arm, $(ARCH)) -DIET = $(shell test -x /usr/bin/diet && echo diet) -endif -endif +#ifneq (mips, $(ARCH)) +## diet libc eabi support is mostly broken +#ifneq (arm, $(ARCH)) +#DIET = $(shell test -x /usr/bin/diet && echo diet) +#endif +#endif ifeq ($(DIET), diet) @@ -63,7 +63,6 @@ DIETLIBC_LIBC = /usr/lib/dietlibc/lib-$(ARCH)/libcompat.a GLIBC_INCLUDES = -I. INCLUDES = $($(L)_INCLUDES) -GLIBC_LDFLAGS = -static LDFLAGS = $($(L)_LDFLAGS) STAGE1_LIBC = $($(L)_LIBC) diff --git a/mdk-stage1/NEWS b/mdk-stage1/NEWS index ab6c848f7..3c65b1bd5 100644 --- a/mdk-stage1/NEWS +++ b/mdk-stage1/NEWS @@ -1,3 +1,7 @@ +- build init and stage1 as a shared library (due to bugs in directory handling + in dietlibc as exposed in libkmod but also because glibc is already include in + dracut) + 1.82 - detect new kernel-3.12 modules |