New user self-registration is disabled due to spam. For an account please email bugs-admin@lists.llvm.org with your e-mail address and full name.

Bug 11924 - clang makefile assumes all powerpc systems have altivec
Summary: clang makefile assumes all powerpc systems have altivec
Status: NEW
Alias: None
Product: clang
Classification: Unclassified
Component: Frontend (show other bugs)
Version: unspecified
Hardware: Macintosh Linux
: P normal
Assignee: Unassigned Clang Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-04 17:30 PST by Matthew Wala
Modified: 2012-02-06 21:07 PST (History)
3 users (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Wala 2012-02-04 17:30:43 PST
Compiling clang 3.0 with g++ 4.4.5 on a PowerPC G3 system (no AltiVec) running Linux results in a clang binary which crashes when the lexer runs. The problem is these lines in lib/Lex/Makefile which cause the compiler to compile a section with AltiVec instructions in Lexer.cpp:

ifeq ($(ARCH),PowerPC)
CXX.Flags += -maltivec
endif

These lines are still in trunk. When I remove them then the compiled binary runs fine. Not all PowerPC systems have AltiVec support, so these lines should be removed or replaced with a more intelligent test.
Comment 1 NAKAMURA Takumi 2012-02-06 21:07:07 PST
How about adding an option "--disable-altivec"?