← Commit list

ef8f423e9

Rob Landley
Rob Landley
2005-07-28
FAILED Duration: 20s

Subject

Erik pointed out that in the last try at the #ifdef cleanup infrastructure, the compiler isn't smart enough to replace const static int with the constant, and allocates space for each set of them, bloating the executable something fierce. Oops.

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 →

Makefile+3 -1
@@ -214,7 +214,9 @@ include/config.h: .config
include/bb_config.h: include/config.h
echo "#ifndef AUTOCONF_INCLUDED" > $@
- sed -e 's/#undef \(.*\)/static const int \1 = 0;/' < $< >> $@
+ sed -e 's/#undef CONFIG_\(.*\)/#define ENABLE_\1 0/' \
+ -e 's/#define CONFIG_\(.*\)/#define CONFIG_\1\n#define ENABLE_\1/' \
+ < $< >> $@
echo "#endif" >> $@
finished2:
networking/ifconfig.c+1 -1
@@ -559,7 +559,7 @@ int ifconfig_main(int argc, char **argv)
continue;
} /* end of while-loop */
- if (CONFIG_FEATURE_CLEAN_UP) close(sockfd);
+ if (ENABLE_FEATURE_CLEAN_UP) close(sockfd);
return goterr;
}