← Commit list

1fdd83f89

Rob Landley
Rob Landley
2006-08-29
SOURCE BUG Duration: 37s

Subject

There's some strange bug in glibc that triggers if you combine the --gc-sections linker flag with static linking. If this happens, then the "stdout" variable (used by printf() and such) will only work if stdout is _not_ redirected. I.E "./busybox" prints stuff, but "./busybox | cat" does not produ

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 (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

Rules.mak+5 -2
@@ -267,8 +267,6 @@ ifeq ($(strip $(CONFIG_DEBUG)),y)
CFLAGS +=-g
else
CFLAGS +=-DNDEBUG
- CHECKED_LDFLAGS += $(call check_ld,$(LD),--sort-common,)
- CHECKED_LDFLAGS += $(call check_ld,$(LD),--gc-sections,)
endif
ifneq ($(strip $(CONFIG_DEBUG_PESSIMIZE)),y)
@@ -288,6 +286,11 @@ endif
STRIPCMD:=$(call check_strip,$(STRIP),-s --remove-section=.note --remove-section=.comment,$(STRIP))
ifeq ($(strip $(CONFIG_STATIC)),y)
PROG_CFLAGS += $(call check_cc,$(CC),-static,)
+else
+ ifneq ($(strip $(CONFIG_DEBUG)),y)
+ CHECKED_LDFLAGS += $(call check_ld,$(LD),--sort-common,)
+ CHECKED_LDFLAGS += $(call check_ld,$(LD),--gc-sections,)
+ endif
endif
CFLAGS_SHARED := $(call check_cc,$(CC),-shared,)
LIB_CFLAGS+=$(CFLAGS_SHARED)