Browse Source

use HOST_CFLAGS for Kconfig and adk tools

Waldemar Brodkorb 9 years ago
parent
commit
5c5b24f413
3 changed files with 6 additions and 3 deletions
  1. 2 0
      adk/config/Makefile
  2. 3 3
      mk/build.mk
  3. 1 0
      scripts/scan-tools.sh

+ 2 - 0
adk/config/Makefile

@@ -1,6 +1,8 @@
 # This file is part of the OpenADK project. OpenADK is copyrighted
 # material, please see the LICENCE file in the top-level directory.
 
+include ${ADK_TOPDIR}/prereq.mk
+
 ifneq ($(filter-out clean,${MAKECMDGOALS}),)
 include ${ADK_TOPDIR}/rules.mk
 endif

+ 3 - 3
mk/build.mk

@@ -561,13 +561,13 @@ buildall:
 	$(GMAKE) ADK_VERBOSE=1 all 2>&1 | tee firmware/buildall.log
 
 $(ADK_TOPDIR)/adk/tools/pkgmaker: $(ADK_TOPDIR)/adk/tools/pkgmaker.c $(ADK_TOPDIR)/adk/tools/sortfile.c $(ADK_TOPDIR)/adk/tools/strmap.c
-	@$(HOST_CC) -O0 -g0 -o $@ adk/tools/pkgmaker.c adk/tools/sortfile.c adk/tools/strmap.c
+	@$(HOST_CC) $(HOST_CFLAGS) -O0 -g0 -o $@ adk/tools/pkgmaker.c adk/tools/sortfile.c adk/tools/strmap.c
 
 $(ADK_TOPDIR)/adk/tools/pkgrebuild: $(ADK_TOPDIR)/adk/tools/pkgrebuild.c $(ADK_TOPDIR)/adk/tools/strmap.c
-	@$(HOST_CC) -O0 -g0 -o $@ adk/tools/pkgrebuild.c adk/tools/strmap.c
+	@$(HOST_CC) $(HOST_CFLAGS) -O0 -g0 -o $@ adk/tools/pkgrebuild.c adk/tools/strmap.c
 
 $(ADK_TOPDIR)/adk/tools/depmaker: $(ADK_TOPDIR)/adk/tools/depmaker.c
-	@$(HOST_CC) -O0 -g0 -o $@ $(ADK_TOPDIR)/adk/tools/depmaker.c
+	$(HOST_CC) $(HOST_CFLAGS) -O0 -g0 -o $@ $(ADK_TOPDIR)/adk/tools/depmaker.c
 
 menu .menu: $(wildcard package/*/Makefile) $(wildcard target/*/systems) $(wildcard target/*/systems/*) $(ADK_TOPDIR)/adk/tools/pkgmaker $(ADK_TOPDIR)/adk/tools/pkgrebuild $(wildcard target/appliances/*)
 	@echo "Generating menu structure ..."

+ 1 - 0
scripts/scan-tools.sh

@@ -100,6 +100,7 @@ X=$($makecmd ADK_TOPDIR=$topdir LDADD=-lgcc 2>&1)
 if [[ $X != *@(Native compiler works)* ]]; then
 	echo Cannot compile with shared libgcc use static one.
 	HOST_CFLAGS=-static-libgcc
+	echo "HOST_CFLAGS:=-static-libgcc" >> $topdir/prereq.mk
 fi
 
 X=$($makecmd ADK_TOPDIR=$topdir HOST_CFLAGS=${HOST_CFLAGS} 2>&1)