summaryrefslogtreecommitdiffstats
path: root/mdk-stage1
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-11-12 18:10:46 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-11-12 18:10:46 +0000
commitecc7cafc9be7f40c9002b3cf299311bf2bba392d (patch)
tree449322a28defd1784fc9f07b069c81884fd8b016 /mdk-stage1
parentd2095b92c6dc4ce18831aae266851680691ea939 (diff)
downloaddrakx-ecc7cafc9be7f40c9002b3cf299311bf2bba392d.tar
drakx-ecc7cafc9be7f40c9002b3cf299311bf2bba392d.tar.gz
drakx-ecc7cafc9be7f40c9002b3cf299311bf2bba392d.tar.bz2
drakx-ecc7cafc9be7f40c9002b3cf299311bf2bba392d.tar.xz
drakx-ecc7cafc9be7f40c9002b3cf299311bf2bba392d.zip
build init using $(DIET) just like stage2-* (needed for ppc, and nicer),
unify LDFLAGS_INIT and LDFLAGS_STAGE1
Diffstat (limited to 'mdk-stage1')
-rw-r--r--mdk-stage1/Makefile28
-rw-r--r--mdk-stage1/Makefile.common3
2 files changed, 8 insertions, 23 deletions
diff --git a/mdk-stage1/Makefile b/mdk-stage1/Makefile
index c4550e8a5..83672a25c 100644
--- a/mdk-stage1/Makefile
+++ b/mdk-stage1/Makefile
@@ -134,22 +134,6 @@ NETWORK_DEFS = -DDISABLE_CDROM -DDISABLE_DISK
STAGE1OBJS-FULL = $(subst .c,-FULL.o,$(STAGE1_ALLSRC))
-
-ifeq (i386, $(ARCH))
-LDFLAGS_INIT = -static -nostdlib /usr/lib/crt1.o
-else
-ifeq (x86_64, $(ARCH))
-LDFLAGS_INIT = -static -nostdlib /usr/$(LIB)/crt1.o
-else
-ifeq (ia64, $(ARCH))
-LDFLAGS_INIT = -static
-else
-LDFLAGS_INIT = -nostdlib
-endif
-endif
-endif
-
-
BINS = init init-stage2 stage1-full
ifndef MOVE
@@ -192,23 +176,23 @@ dirs:
done
init: $(INITOBJS)
- $(CC) $(LDFLAGS_INIT) -o $@ $^
+ $(DIET) $(CC) $(LDFLAGS) -o $@ $^
$(STRIPCMD) $@
init-stage2: $(INITOBJS-STAGE2)
- $(CC) $(LDFLAGS_INIT) -o $@ $^
+ $(DIET) $(CC) $(LDFLAGS) -o $@ $^
$(STRIPCMD) $@
stage1-cdrom: $(STAGE1OBJS-CDROM) $(STAGE1_OWN_LIBS) $(FRONTEND_LINK) $(STAGE1_LIBC)
- $(DIET) $(CC) $(LDFLAGS_STAGE1) -o $@ $^
+ $(DIET) $(CC) $(LDFLAGS) -o $@ $^
$(STRIPCMD) $@
stage1-network: $(STAGE1OBJS-NETWORK) $(STAGE1_OWN_LIBS) $(STAGE1_NETWORK_LIBS) $(FRONTEND_LINK) $(PCMCIA_LIB) $(STAGE1_LIBC)
- $(DIET) $(CC) $(LDFLAGS_STAGE1) -o $@ $^
+ $(DIET) $(CC) $(LDFLAGS) -o $@ $^
$(STRIPCMD) $@
stage1-full: $(STAGE1OBJS-FULL) $(STAGE1_OWN_LIBS) $(STAGE1_NETWORK_LIBS) $(FRONTEND_LINK) $(PCMCIA_LIB) $(STAGE1_LIBC)
- $(DIET) $(CC) $(LDFLAGS_STAGE1) -o $@ $^
+ $(DIET) $(CC) $(LDFLAGS) -o $@ $^
$(STRIPCMD) $@
@@ -247,7 +231,7 @@ tar-mkinitrd_helper: clean
rm -rf mkinitrd_helper-subdir
rescue-gui: rescue-gui.o frontend-common.o $(FRONTEND_LINK) $(STAGE1_LIBC)
- $(DIET) $(CC) $(LDFLAGS_STAGE1) -o $@ $^
+ $(DIET) $(CC) $(LDFLAGS) -o $@ $^
$(STRIPCMD) $@
diff --git a/mdk-stage1/Makefile.common b/mdk-stage1/Makefile.common
index d16c260e4..f1a662805 100644
--- a/mdk-stage1/Makefile.common
+++ b/mdk-stage1/Makefile.common
@@ -49,7 +49,8 @@ DIETLIBC_INCLUDES = -I$(top_dir)/dietlibc/include -I. -I$(top_dir)/bzlib
GLIBC_INCLUDES = -I. -I$(top_dir)/bzlib
INCLUDES = $($(L)_INCLUDES)
-LDFLAGS_STAGE1 = $($(L)_LDFLAGS_STAGE1)
+GLIBC_LDFLAGS = -static
+LDFLAGS = $($(L)_LDFLAGS)
STAGE1_LIBC = $($(L)_LIBC)