[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Passing variables to a Makefile



On Thu, Oct 11, 2007 at 10:52:03AM +0900, Charles Plessy wrote:
> Dear mentors,
> 
> in a package I prepare, there is the following line in a source/Makefile:
> 
>   CPPFLAGS=-O3 -funroll-loops -march=i686 -mfpmath=sse -msse  -mmmx
CPPFLAGS is for the C PreProcessor.  So it's supposed to have things
like -Iinclude -DFOO=BAR.  CFLAGS is for the C compiler itself, so
it's supposed to have things like -O3 -funroll-loops -std=gnu99 -Wall
-Wextra.  But it only matters if you're using the implicit rules and
the binaries are built from multiple source files or are otherwise
compiled and linked in separate invocations.  BTW there's LDFLAGS too
for linker options like -Wl,-soname,libfoo.so.1 -Wl,-O2 (here it's
assumed that LD=gcc thus the -Wl, thing).

I think that Debian packages shouldn't have subarch-specific options
on any arch, since the same binaries may/(have to be able to) be run
on variation on that arch.  In the case of i386, the binaries have to
be able to run on a real 386 [0].  I think all the arch options here
will (maybe) cause the binary to fail on such a machine.

Justin

[0] My understanding is that the packaged kernels don't support 386
but with a software emulation of some math instruction patched in, 386
is advertised as being supported with binary packages.



Reply to: