patchmake - Patches: patch #6203, Remove redundant $(CFLAGS) from...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #6203: Remove redundant $(CFLAGS) from link command

Submitter:  Diego Biurrun <dondiego>
Submitted:  Mon 17 Sep 2007 11:21:17 AM UTC
   
 
Category:  None Priority:  5 - Normal
Status:  Wont Do Privacy:  Public
Assigned to:  None Open/Closed:  Closed
Fixed Release:  None

Mon 17 Sep 2007 12:14:29 PM UTC, comment #1: 

It's not true that CFLAGS is redundant and unnecessary on a link line; in fact CFLAGS often contains flags like -g (enable debugging) or -O (enable optimization) that some linker implementations also pay attention to.

In fact, almost every link invocation in every make program will include CFLAGS on the link line, and GNU make does include CFLAGS on its link line in its built-in linker rules.

Paul D. Smith <psmith>
Group administrator
Mon 17 Sep 2007 11:21:17 AM UTC, original submission:  

In the "Using Implicit Rules" section there is the following example rule:

foo : foo.o bar.o
        cc -o foo foo.o bar.o $(CFLAGS) $(LDFLAGS)

This is a linking command so the CFLAGS in that line are redundant and arguably an unnecessary obfuscation. Here is a patch to remove the CFLAGS variable from that line to simplify/clarify the example.

Diego Biurrun <dondiego>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #13968:  redundant_cflags.diff added by dondiego (453B - text/x-diff - Remove redundant $(CFLAGS) from linker command.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by psmith (Posted a comment)
  • -email is unavailable- added by dondiego (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-09-17 psmith StatusNone Wont Do
        Open/ClosedOpen Closed
    2007-09-17 dondiego Attached File- Added redundant_cflags.diff, #13968

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code