[LEDE-DEV] [PATCH] include/u-boot.mk: rename to HOST_CPPFLAGS

txt.file txt.file at txtfile.eu
Thu Jun 15 17:29:00 PDT 2017


I was not aware of the internal variable. What I discovered so far:
```
txt at txt:/media/ssd/lede$ grep --no-message -R HOSTCPPFLAGS ./
./include/u-boot.mk:	HOSTCFLAGS='$(HOST_CFLAGS) $$$$(HOSTCPPFLAGS)' \
txt at txt:/media/ssd/lede$ grep --no-message -R HOST_CPPFLAGS ./
./package/devel/strace/Makefile:	CPPFLAGS_FOR_BUILD="$(HOST_CPPFLAGS)" \
./tools/mkimage/Makefile:	$(MAKE) -C $(HOST_BUILD_DIR) defconfig   HOSTCFLAGS="$(HOST_CPPFLAGS) $(HOST_CFLAGS)" HOSTLDFLAGS="$(HOST_LDFLAGS)" HOST_LOADLIBES="$$$$(pkg-config --static --libs libcrypto)"
./tools/mkimage/Makefile:	$(MAKE) -C $(HOST_BUILD_DIR) tools-only  HOSTCFLAGS="$(HOST_CPPFLAGS) $(HOST_CFLAGS)" HOSTLDFLAGS="$(HOST_LDFLAGS)" HOST_LOADLIBES="$$$$(pkg-config --static --libs libcrypto)"
./include/host-build.mk:	CPPFLAGS="$(HOST_CPPFLAGS)" \
./include/host-build.mk:	CPPFLAGS="$(HOST_CPPFLAGS)" \
./rules.mk:HOST_CPPFLAGS:=-I$(STAGING_DIR_HOST)/include -I$(STAGING_DIR_HOST)/usr/include $(if $(IS_PACKAGE_BUILD),-I$(STAGING_DIR_HOSTPKG)/include -I$(STAGING_DIR)/host/include)
./rules.mk:HOST_CFLAGS:=-O2 $(HOST_CPPFLAGS)
txt at txt:/media/ssd/lede$ 
```
and
```
txt at fr:~/workspace/lede-master$ make -j1 V=s package/uboot-omap/compile
[…]
#
# configuration written to .config
#
make[3]: Leaving directory `/home/txt/workspace/lede-master/build_dir/target-arm_cortex-a8+vfpv3_musl_eabi/u-boot-am335x_boneblack/u-boot-2017.01'
rm -f /home/txt/workspace/lede-master/build_dir/target-arm_cortex-a8+vfpv3_musl_eabi/u-boot-am335x_boneblack/u-boot-2017.01/.configured_*
touch /home/txt/workspace/lede-master/build_dir/target-arm_cortex-a8+vfpv3_musl_eabi/u-boot-am335x_boneblack/u-boot-2017.01/.configured_68b329da9893e34099c7d8ad5cb9c940
rm -f /home/txt/workspace/lede-master/build_dir/target-arm_cortex-a8+vfpv3_musl_eabi/u-boot-am335x_boneblack/u-boot-2017.01/.built
touch /home/txt/workspace/lede-master/build_dir/target-arm_cortex-a8+vfpv3_musl_eabi/u-boot-am335x_boneblack/u-boot-2017.01/.built_check
make  -C /home/txt/workspace/lede-master/build_dir/target-arm_cortex-a8+vfpv3_musl_eabi/u-boot-am335x_boneblack/u-boot-2017.01 CROSS_COMPILE=arm-openwrt-linux-muslgnueabi- DTC="/home/txt/workspace/lede-master/build_dir/target-arm_cortex-a8+vfpv3_musl_eabi/linux-omap/linux-4.4.71/scripts/dtc/dtc" HOSTCC="gcc" HOSTCFLAGS='-O2 -I/home/txt/workspace/lede-master/staging_dir/host/include -I/home/txt/workspace/lede-master/staging_dir/host/usr/include -I/home/txt/workspace/lede-master/staging_dir/hostpkg/include -I/home/txt/workspace/lede-master/staging_dir/target-arm_cortex-a8+vfpv3_musl_eabi/host/include $$(HOSTCPPFLAGS)' HOSTLDFLAGS=""
make[3]: Entering directory `/home/txt/workspace/lede-master/build_dir/target-arm_cortex-a8+vfpv3_musl_eabi/u-boot-am335x_boneblack/u-boot-2017.01'
  HOSTCC  scripts/basic/fixdep
/bin/sh: HOSTCPPFLAGS: command not found
/bin/sh: HOSTCPPFLAGS: command not found
/bin/sh: HOSTCPPFLAGS: command not found
/bin/sh: HOSTCPPFLAGS: command not found
/bin/sh: HOSTCPPFLAGS: command not found
  HOSTCC  scripts/kconfig/conf.o
/bin/sh: HOSTCPPFLAGS: command not found
/bin/sh: HOSTCPPFLAGS: command not found
/bin/sh: HOSTCPPFLAGS: command not found
/bin/sh: HOSTCPPFLAGS: command not found
/bin/sh: HOSTCPPFLAGS: command not found
  HOSTCC  scripts/kconfig/zconf.tab.o
/bin/sh: HOSTCPPFLAGS: command not found
  HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf  --silentoldconfig Kconfig
  CHK     include/config.h
  UPD     include/config.h
  CFG     u-boot.cfg
  GEN     include/autoconf.mk
^Cmake[4]: *** Deleting file `include/autoconf.mk'
make[3]: *** Deleting file `include/config/auto.conf'
```


With one $ sign the "/bin/sh: HOSTCPPFLAGS: command not found"
line is gone. uboot-omap and uboot-sunxi still compile. I did not
test all uboot-… packages.

kind regards
txt.file
--
This message is signed.

Felix Fietkau:
> On 2017-06-14 02:16, Matthias Fritzsche wrote:
>> * On other places the variable is written with an underscore.
>> * With one $ sign it treats it as variable. With the former
>>   four signs it tried to execute a command with this name.
>>
>> Signed-off-by: Matthias Fritzsche <txt.file at txtfile.eu>
>> ---
>>  include/u-boot.mk | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/include/u-boot.mk b/include/u-boot.mk
>> index 4b3ff69d6b..6cfc05c76c 100644
>> --- a/include/u-boot.mk
>> +++ b/include/u-boot.mk
>> @@ -42,7 +42,7 @@ TARGET_DEP = TARGET_$(BUILD_TARGET)$(if $(BUILD_SUBTARGET),_$(BUILD_SUBTARGET))
>>  
>>  UBOOT_MAKE_FLAGS = \
>>  	HOSTCC="$(HOSTCC)" \
>> -	HOSTCFLAGS='$(HOST_CFLAGS) $$$$(HOSTCPPFLAGS)' \
>> +	HOSTCFLAGS='$(HOST_CFLAGS) $(HOST_CPPFLAGS)' \
> Did you actually test this? I believe it will break several u-boot
> builds. The intention behind $$$$(HOSTCPPFLAGS) was to let the submake
> inside the build system resolve this to its own HOSTCPPFLAGS variable.
> 
> - Felix
> 
> _______________________________________________
> Lede-dev mailing list
> Lede-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20170616/3d6d21b3/attachment.sig>


More information about the Lede-dev mailing list