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
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)
No binary (build failed)
—
(log yok)
| @@ -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) | |