bug-hurd
[Top][All Lists]
Advanced

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

[PATCH] Makeconf: controlling the optimization level


From: Neal H Walfield
Subject: [PATCH] Makeconf: controlling the optimization level
Date: Sun, 15 Apr 2001 18:17:12 +0200
User-agent: Mutt/1.3.15i

This patch adds a variable, COPTIMIZE, to Makeconf.  This allows the
user to easily control the level of optimization for a single file
or a single module.  For example:

        # cd libdiskfs
        # COPTIMIZE= make

would build libdiskfs with minimal optimizations thus not eliminating
variables that may aid in debugging.  This is necessary as gcc selects
the highest flags thus:

        # CFLAGS=-O make

would be overridden by the default value in CFLAGS.

2001-04-15  Neal H Walfield  <neal@cs.uml.edu>

        * Makeconf (COPTIMIZE): New variable.  Define this to -O3 if
        COPTIMIZE it not already defined.
        (CFLAGS): Do not use -O3 directly, rather, use $(COPTIMIZE).


diff --exclude CVS --exclude configure -urN hurd-20010412-snapshot/Makeconf 
hurd-20010412/Makeconf
--- hurd-20010412-snapshot/Makeconf     Mon Mar 12 01:42:56 2001
+++ hurd-20010412/Makeconf      Sun Apr 15 11:18:20 2001
@@ -80,7 +80,8 @@
 top_srcdirinc=-I$(top_srcdir)
 endif
 CPPFLAGS += -I. $(srcdirinc) -I.. $(top_srcdirinc) -I$(top_srcdir)/include 
-D_GNU_SOURCE $($*-CPPFLAGS)
-CFLAGS += -Wall -g -O3
+COPTIMIZE ?= -O3
+CFLAGS += -Wall -g $(COPTIMIZE)
 
 # More useful version of HURDLIBS
 library_deps=$(foreach lib,$(HURDLIBS),$(..)lib$(lib)/lib$(lib).so)

Attachment: pgpL4zJxPt3s5.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]