[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [5561] Guard against a perilous command-line override
From: |
Greg Chicares |
Subject: |
[lmi-commits] [5561] Guard against a perilous command-line override |
Date: |
Mon, 03 Sep 2012 09:54:27 +0000 |
Revision: 5561
http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=5561
Author: chicares
Date: 2012-09-03 09:54:26 +0000 (Mon, 03 Sep 2012)
Log Message:
-----------
Guard against a perilous command-line override
Modified Paths:
--------------
lmi/trunk/workhorse.make
Modified: lmi/trunk/workhorse.make
===================================================================
--- lmi/trunk/workhorse.make 2012-08-31 17:45:11 UTC (rev 5560)
+++ lmi/trunk/workhorse.make 2012-09-03 09:54:26 UTC (rev 5561)
@@ -563,10 +563,19 @@
# suffice to suppress the diagnostic, but this file actually doesn't
# need any optimization at all.
#
-# A similar problem was observed with 'my_db.cpp'.
+# The same problem was observed with 'my_db.cpp'. For good measure,
+# all similarly-coded 'my_*.cpp' files are treated the same way.
-my_db.o my_prod.o: optimization_flag := -O0
+my_unoptimizable_files := my_db.o my_fund.o my_prod.o my_rnd.o my_tier.o
+$(my_unoptimizable_files): optimization_flag := -O0
+
+# Blocking optimization in default $(CXXFLAGS) isn't enough, because
+# it is too easily overridden by specifying $(CXXFLAGS) on the command
+# line. This flag overrides such overrides:
+
+$(my_unoptimizable_files): tutelary_flag := -O0
+
################################################################################
# Libraries and associated options.
@@ -725,8 +734,8 @@
ALL_ARFLAGS = $(REQUIRED_ARFLAGS) $(ARFLAGS)
ALL_CPPFLAGS = $(REQUIRED_CPPFLAGS) $(CPPFLAGS)
-ALL_CXXFLAGS = $(REQUIRED_CXXFLAGS) $(CXXFLAGS)
-ALL_CFLAGS = $(REQUIRED_CFLAGS) $(CFLAGS)
+ALL_CXXFLAGS = $(REQUIRED_CXXFLAGS) $(CXXFLAGS) $(tutelary_flag)
+ALL_CFLAGS = $(REQUIRED_CFLAGS) $(CFLAGS) $(tutelary_flag)
ALL_LDFLAGS = $(REQUIRED_LDFLAGS) $(LDFLAGS)
ALL_RCFLAGS = $(REQUIRED_RCFLAGS) $(RCFLAGS)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lmi-commits] [5561] Guard against a perilous command-line override,
Greg Chicares <=