[haiku-commits] haiku: hrev52246 - build/jam

  • From: waddlesplash <waddlesplash@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 17 Aug 2018 21:56:43 -0400 (EDT)

hrev52246 adds 1 changeset to branch 'master'
old head: dd54d46895b885d73346954133e41d0d8ebc7bae
new head: 28ab14e35f743086e9191f8be0302b033c71ae8d
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=28ab14e35f74+%5Edd54d46895b8

----------------------------------------------------------------------------

28ab14e35f74: MainBuildRules: Use $(CC) -E instead of "cpp" as the preprocessor.
  
  "cpp" is the system C preprocessor, not the one from our cross-compiler,
  and in the case of my system which does not have GCC installed at all,
  it doesn't even exist.
  
  With this, Clang-ARM builds successfully create a "haiku-arm.mmc".
  I couldn't get it to output, even after blessing it with "rune",
  but that may just be my fault...

                              [ Augustin Cavalier <waddlesplash@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev52246
Commit:      28ab14e35f743086e9191f8be0302b033c71ae8d
URL:         https://git.haiku-os.org/haiku/commit/?id=28ab14e35f74
Author:      Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date:        Sat Aug 18 01:54:56 2018 UTC

----------------------------------------------------------------------------

1 file changed, 10 insertions(+), 5 deletions(-)
build/jam/MainBuildRules | 15 ++++++++++-----

----------------------------------------------------------------------------

diff --git a/build/jam/MainBuildRules b/build/jam/MainBuildRules
index b33ad8c9e8..b85b2d3398 100644
--- a/build/jam/MainBuildRules
+++ b/build/jam/MainBuildRules
@@ -185,15 +185,20 @@ actions AssembleNasm
        fi
 }
 
-rule CompileDTS
+rule CompileDTS target : source
 {
-       MakeLocate $(<) : $(HAIKU_OUTPUT_DIR) ;
-       Depends $(<) : $(>) ;
+       CCDEFS on $(target) = [ FDefines 
$(TARGET_DEFINES_$(TARGET_PACKAGING_ARCH))
+               $(TARGET_DEFINES) ] ;
+       CC on $(target) = $(TARGET_CC_$(TARGET_PACKAGING_ARCH)) ;
+
+       MakeLocate $(target) : $(HAIKU_OUTPUT_DIR) ;
+       Depends $(target) : $(source) ;
+       CompileDTS1 $(target) : $(source) ;
 }
 
-actions CompileDTS
+actions CompileDTS1
 {
-       cpp -P -xassembler-with-cpp \
+       $(CC) -E $(CCDEFS) -P -xassembler-with-cpp \
                -I$(HAIKU_TOP)/src/data/dts/arch/$(TARGET_ARCH) \
                -I$(HAIKU_TOP)/src/data/dts $(2) \
        | dtc -O dtb -o $(1) \


Other related posts: