Skip to contentSkip to conversation

Hexagon (tests/tcg/hexagon) add compiler options to EXTRA_CFLAGS

PATCH In review Taylor Simpson 4 participants 4 messages Jul 26, 2022 – Jul 28, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Hexagon (tests/tcg/hexagon) add compiler options to EXTRA_CFLAGS

The cross_cc_cflags_hexagon in configure are not getting passed to the Hexagon cross compiler. Set EXTRA_CFLAGS in tests/tcg/hexagon/Makefile.target.

---
 tests/tcg/hexagon/Makefile.target | 1 +
 1 file changed, 1 insertion(+)
tests/tcg/hexagon/Makefile.target +1 -0
index 23b9870534..627bf58fe6 100644
@@ -20,6 +20,7 @@ EXTRA_RUNS =
 
 CFLAGS += -Wno-incompatible-pointer-types -Wno-undefined-internal
 CFLAGS += -fno-unroll-loops
+EXTRA_CFLAGS += -mv67 -O2
 
 HEX_SRC=$(SRC_PATH)/tests/tcg/hexagon
 VPATH += $(HEX_SRC)
Signature · 1 line
2.17.1
#1 lore raw

Hi Taylor,

Quoted 15 lines · Taylor Simpson

The cross_cc_cflags_hexagon in configure are not getting passed to the Hexagon cross compiler. Set EXTRA_CFLAGS in tests/tcg/hexagon/Makefile.target.

---
  tests/tcg/hexagon/Makefile.target | 1 +
  1 file changed, 1 insertion(+)
tests/tcg/hexagon/Makefile.target +0 -0
index 23b9870534..627bf58fe6 100644

tests/tcg/hexagon/Makefile.target EXTRA_RUNS = · line 26

Quoted 7 lines
tests/tcg/hexagon/Makefile.target +1 -0
@@ -20,6 +20,7 @@ EXTRA_RUNS =
 
  CFLAGS += -Wno-incompatible-pointer-types -Wno-undefined-internal
  CFLAGS += -fno-unroll-loops
+EXTRA_CFLAGS += -mv67 -O2
 
  HEX_SRC=$(SRC_PATH)/tests/tcg/hexagon
  VPATH += $(HEX_SRC)

My understanding of Richard suggestion is something like:

-- >8 --
@@ -45,6 +45,8 @@ HEX_TESTS += overflow

TESTS += $(HEX_TESTS)

+$(filter-out usr, $(HEX_TESTS)): CFLAGS += -mv67 -O2 +
# This test has to be compiled for the -mv67t target
usr: usr.c

        $(CC) $(CFLAGS) -mv67t -O2 -Wno-inline-asm 

-Wno-expansion-to-defined $< -o $@ $(LDFLAGS)
---

Eventually to keep the same style in the file:
-- >8 --
@@ -46,6 +46,5 @@ HEX_TESTS += overflow
TESTS += $(HEX_TESTS)

# This test has to be compiled for the -mv67t target
-usr: usr.c
- $(CC) $(CFLAGS) -mv67t -O2 -Wno-inline-asm -Wno-expansion-to-defined $< -o $@ $(LDFLAGS)
+usr: CFLAGS += -mv67t -O2 -Wno-inline-asm -Wno-expansion-to-defined
---

Regards,

Phil.

Reviewed-by on v1 1/1
#2 lore raw
In reply to Taylor Simpson
Quoted 9 lines · Taylor Simpson

The cross_cc_cflags_hexagon in configure are not getting passed to the Hexagon cross compiler. Set EXTRA_CFLAGS in tests/tcg/hexagon/Makefile.target.

---
  tests/tcg/hexagon/Makefile.target | 1 +
  1 file changed, 1 insertion(+)

r~

Quoted 13 lines
tests/tcg/hexagon/Makefile.target +1 -0
index 23b9870534..627bf58fe6 100644
@@ -20,6 +20,7 @@ EXTRA_RUNS =
 
  CFLAGS += -Wno-incompatible-pointer-types -Wno-undefined-internal
  CFLAGS += -fno-unroll-loops
+EXTRA_CFLAGS += -mv67 -O2
 
  HEX_SRC=$(SRC_PATH)/tests/tcg/hexagon
  VPATH += $(HEX_SRC)