[test-suite] / [LNT] debugging the handling of -maltivec in SingleSource/UnitTests/Vector/Altivec/Makefile
Will Schmidt
will_schmidt at vnet.ibm.com
Wed Feb 6 12:53:29 PST 2013
Hi all,
I've been poking at the clang buildbots for powerpc64, specifically
trying to work out why the -maltivec flag does not get passed to the
compile steps in the Makefile within the LNT build environment.
Specifically this line:
$(LCC) $(CPPFLAGS) $(CFLAGS) $(OPTFLAGS) $(TARGET_FLAGS) -c $< -o $@
in
SingleSource/Makefile.singlesrc
Per some debug, it appears that the setting of TARGET_FLAGS in
SingleSource/UnitTests/Vector/Altivec/Makefile does *not* stick. i.e.
the Makefile currently contains:
FP_TOLERANCE := 0.002
TARGET_FLAGS += -maltivec
LCCFLAGS += -maltivec
and added debug to Makefile like so:
+ CFLAGS += -maltivec
+ $(warning "TARGET_FLAGS is ${TARGET_FLAGS}")
+ $(warning "LCCFLAGS is ${LCCFLAGS}")
+ $(warning "FP_TOLERANCE is ${FP_TOLERANCE}")
+ $(warning "CFLAGS is ${CFLAGS}")
and to Makefile.singlesrc like so:
+ $(warning TARGET_FLAGS=${TARGET_FLAGS} LCCFLAGS=${LCCFLAGS} LDFLAGS=${LDFLAGS} CFLAGS=${CFLAGS} ) \
provides output like so:
Makefile:16: "TARGET_FLAGS is "
Makefile:17: "LCCFLAGS is -maltivec"
Makefile:18: "FP_TOLERANCE is 0.002"
Makefile:19: "CFLAGS is -maltivec"
and:
../../../../SingleSource/Makefile.singlesrc:59: TARGET_FLAGS= LCCFLAGS=-maltivec LDFLAGS= CFLAGS=-maltivec
So TARGET_FLAGS is blank, and the intended value does not get to the
build rule. LCCFLAGS does contain the flag, but is not actually used
as part of the build rule.
I do see what looks like special handling of TARGET_FLAGS in
lnt/tests/nt.py. A few additional experiments in adding TARGET_FLAG and
TARGET_FLAGS2 variables confirms that TARGET_FLAGS is indeed specially
handled by the lnt.py code. I don't fully grok the reasoning or intent
behind that behavior, but suspect it's not working quite as intended.
So two quick options are
- add "CFLAGS += -maltivec" line to S/U/V/A/Makefile
or
- add $(LCCFLAGS) to the rules in SingleSource/Makefile.singlesrc .
Thoughts?
Thanks,
-Will
-------------- next part --------------
A non-text attachment was scrubbed...
Name: add_CFLAG_maltivec_to_SUVAMakefile.diff
Type: text/x-patch
Size: 400 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130206/400fbf75/attachment.bin>
More information about the llvm-commits
mailing list