Hexagon (tests/tcg/hexagon) add compiler options to EXTRA_CFLAGS
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
@@ -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
Hi Taylor,
Quoted 15 lines · Taylor Simpson
The
cross_cc_cflags_hexagonin configure are not getting passed to the Hexagon cross compiler. SetEXTRA_CFLAGSin tests/tcg/hexagon/Makefile.target.Suggested-by Richard Henderson <[email protected]>Signed-off-by Taylor Simpson <[email protected]>--- tests/tcg/hexagon/Makefile.target | 1 + 1 file changed, 1 insertion(+)tests/tcg/hexagon/Makefile.target +0
-0
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.
Quoted 9 lines · Taylor Simpson
The
cross_cc_cflags_hexagonin configure are not getting passed to the Hexagon cross compiler. SetEXTRA_CFLAGSin tests/tcg/hexagon/Makefile.target.Suggested-by Richard Henderson <[email protected]>Signed-off-by Taylor Simpson <[email protected]>--- tests/tcg/hexagon/Makefile.target | 1 + 1 file changed, 1 insertion(+)
r~
Quoted 13 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)
Quoted 7 lines · Taylor Simpson
The
cross_cc_cflags_hexagonin configure are not getting passed to the Hexagon cross compiler. SetEXTRA_CFLAGSin tests/tcg/hexagon/Makefile.target.Suggested-by Richard Henderson<[email protected]>Signed-off-by Taylor Simpson<[email protected]>---
The bug applies to all targets, I am going to post a patch to fix it.
Paolo