Mailing List archive

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

[vdr] Re: @Klaus Schmidinger: Suggestion for -O options in plugin-makefiles




On Thu, Dec 12, 2002 at 07:56:18PM +0100, Ronald Steininger wrote:
> On Thu, 12 Dec 2002 18:27:20 +0100, "Rene Bartsch" <vdr@bartschnet.de> wrote:
> > 
> > After setting HOSTCFLAGS and CFLAGS in "/usr/src/linux/Makefile" to "-O3"
> > instead of "-O2" GCC 3.2 used "-O3" instead of "-O2" at any Makefile which
> > didn't define a "-O"-flag itself.
> > 
> > At least with RedHat.

Well, I don't believe this, but if you believe so, be happy with it.

> > Please check it with the other distros ...
> > 
> Spooky...How can the Makefile of the kernel affect compilation of another program.

That could only happen, if the RedHat people were braindead enough to
parse the flags out of kernel makefile and set CFLAGS to it. --- But I
don't think they are. --- But I do not have one at hand and can't
check this.

> I've checked this: It seems that autoconf/automake also includes the env. variables $CFLAGS and $CXXFLAGS, so if they're set, make uses them. They are not set in Gentoo, maybe RedHat get these values from the kernel-Makefile. Are you sure that this works also with non-autoconf Makefiles? What does echo $CFLAGS say?

Yes, configure from autoconf does so.

> Maybe something like CFLAGS="$CFLAGS -O2" would be nice in the vdr-Makefile: This way the system defaults would be used (if CFLAGS is defined) or some standard-values (in this case -O2). The only question is: will gcc use -Osomething from the $CFLAGS or -O2 ?

Klaus, how about the following patch to calm this down?

--- ./Makefile~	2002-12-12 20:23:29.000000000 +0100
+++ ./Makefile	2002-12-12 20:26:12.000000000 +0100
@@ -8,11 +8,19 @@
 
 .DELETE_ON_ERROR:
 
+ifndef CC
 CC       = gcc
+endif
+ifndef CFLAGS
 CFLAGS   = -O2
+endif
 
+ifndef CXX
 CXX      = g++
+endif
+ifndef CXXFLAGS
 CXXFLAGS = -g -O2 -Wall -Woverloaded-virtual
+endif
 
 DVBDIR   = ../DVB
 DTVDIR   = ./libdtv

Robert

-- 
Robert Schiele			Tel.: +49-621-181-2517
Dipl.-Wirtsch.informatiker	mailto:rschiele@uni-mannheim.de

-- Attached file included as plaintext by Listar --

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iQEVAwUBPfjkqsQAnns5HcHpAQH6IAf/QYHPYDJHk5JbdYkEeKPlnZkAJxfTntLz
V3cTaL/XgvZRNEJiEzeq8MQz9HFBxnvWKqrIRwfGKdOLIJRDbplc43L+maP7yiyF
ighw0IQ+s7jGPTt7X64S4I44oLTyZmtJ0noGxqWHSxnt0CUX6W5XJUug7VDqP8EL
CbaqeHA1G/tO5ELTlHFwiyexHWLu5PcTFlOBnqN/f4FKE9kMTjx0re1kA6+Ljn1R
FUuqiMolbLnXQ1HuV1/J78clrxn73KVuQNxqpCumSLXxpdp0gdslAPFa68ZQzESN
IdwOJE1g8eKwJDB01lpDTjdQBZl95nqcnOPFXs3f8ZZ59xOzgVEmDw==
=lcSW
-----END PGP SIGNATURE-----



-- 
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe vdr" as subject.



Home | Main Index | Thread Index