[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How to handle CFLAG ordering
From: |
Matt Turner |
Subject: |
How to handle CFLAG ordering |
Date: |
Wed, 30 May 2012 13:20:30 -0400 |
Hi,
I'm maintaining some ARM/iwMMXt-optimized code in pixman,
http://cgit.freedesktop.org/pixman/
gcc will only emit iwmmxt instructions when -march=iwmmxt{,2} is used,
which is stupid. It also has the side-effect of putting gcc into ARMv5
mode, even though the CPU I care about is ARMv7. So, we want the rest
of the package built with -march=armv7-a.
pixman's build system attempts to compile pixman-mmx.c with
-march=iwmmxt by building it as a convenience library, but when you
build pixman with something like
CFLAGS="-O2 -march=armv7-a -pipe" ./configure
it winds up putting -O2 -march=armv7-a -pipe *after* -march=iwmmxt,
which disables iwmmxt support. There is probably a way to handle this
-- I just don't know how.
The relevant sections of configure.ac and Makefile.am are
http://cgit.freedesktop.org/pixman/tree/configure.ac#n608
http://cgit.freedesktop.org/pixman/tree/pixman/Makefile.am#n93
How can I have automake order the flags such that -march=iwmmxt
appears after the user-specified CFLAGS?
Thanks,
Matt
- How to handle CFLAG ordering,
Matt Turner <=