← Commit list

81b94960a

Bernhard Reutner-Fischer
Bernhard Reutner-Fischer
2006-01-31
SOURCE BUG Duration: 2s

Subject

- pass -static via CC rather than LD

SOURCE BUG

This commit was genuinely broken at the time (not related to our build system): scripts/config/mkconfigs.c (2005-08-01 - 2006-10-05 arasi) uretilen bbconfigopts.h icine .config satirlarini kacissiz, ham newline'larla gömüyordu - gecerli C degildi, busybox'un kendi bb_mkdep araci bile parse edemiyordu (7d219aab7 ile duzeltildi, mkconfigs shell scripte cevrildi)

→ Bu hatanin tam hikayesini ve duzeltme diffini gor

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Debian 14.2.0-19) 14.2.0

—

Build Log

(log yok)

Commit Diff GitHub →

Makefile+2 -2
@@ -280,8 +280,8 @@ $(LIBBUSYBOX_SONAME):
ifndef MAJOR_VERSION
$(error MAJOR_VERSION needed for $@ is not defined)
endif
- $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(LDFLAGS) -shared \
- $(CFLAGS_PIC) \
+ $(CC) $(CFLAGS) $(LIB_CFLAGS) $(EXTRA_CFLAGS) $(LDFLAGS) \
+ $(LIB_LDFLAGS) \
-Wl,-soname=$(LD_LIBBUSYBOX).$(MAJOR_VERSION) \
-Wl,-z,combreloc $(LIB_LDFLAGS) \
-o $(@) \
Rules.mak+6 -12
@@ -118,13 +118,7 @@ check_gcc=$(shell \
# A not very robust macro to check for available ld flags
check_ld=$(shell \
if [ "x$(1)" != "x" ]; then \
- $(LD) --help | grep -q \\$(1) && echo "-Wl,$(1)$(2)" ; \
- fi)
-
-# A not very robust macro to check for available as flags
-check_as=$(shell \
- if [ "x$(1)" != "x" ]; then \
- $(AS) --help | grep -q "\\$(1)" && echo "-Wa,$(1)$(2)" ; \
+ $(LD) --help | grep -q "\$(1)" && echo "-Wl,$(1)" ; \
fi)
@@ -213,19 +207,19 @@ else
endif
ifeq ($(strip $(CONFIG_DEBUG)),y)
CFLAGS +=$(WARNINGS) -g -D_GNU_SOURCE
- LDFLAGS += $(call check_ld,-warn-common,)
+ LDFLAGS += $(call check_ld,--warn-common,)
STRIPCMD:=/bin/true -Not_stripping_since_we_are_debugging
else
CFLAGS+=$(WARNINGS) $(OPTIMIZATIONS) -D_GNU_SOURCE -DNDEBUG
- LDFLAGS += $(call check_ld,-warn-common,)
+ LDFLAGS += $(call check_ld,--warn-common,)
LDFLAGS += $(call check_ld,--sort-common,)
STRIPCMD:=$(STRIP) -s --remove-section=.note --remove-section=.comment
endif
ifeq ($(strip $(CONFIG_STATIC)),y)
- LDFLAGS += $(call check_ld,--static,)
-#else
-# LIBRARIES += -ldl
+ PROG_CFLAGS += $(call check_gcc,-static,)
endif
+CFLAGS_SHARED += $(call check_gcc,-shared,)
+LIB_CFLAGS+=$(CFLAGS_SHARED)
ifeq ($(strip $(CONFIG_BUILD_LIBBUSYBOX)),y)
CFLAGS_PIC:= $(call check_gcc,-fPIC,)