patchGNU Autoconf Archive - Patches: patch #8806, AX_APPEND_COMPILE_FLAGS,...

 
 

patch #8806: AX_APPEND_COMPILE_FLAGS, AX_APPEND_LINK_FLAGS: Optional INPUT arg

Submitter:  None
Submitted:  Sun 22 Nov 2015 08:59:14 AM UTC
 
Priority:  5 - Normal Status:  Done
Assigned to:  simons Originator Email:  -email is unavailable-
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       No canned response available

 

Mon 23 Nov 2015 10:57:58 AM UTC, comment #1: 

Pushed in e3d948b0303aabb8c016c7f3d7f1d538aa5472be. Thank you very much for the patch!

Peter Simons <simons>
Project Administrator
Sun 22 Nov 2015 08:59:14 AM UTC, original submission:  

I'd like to add -fstack-protector-strong.  The obvious solution is

    AX_APPEND_COMPILE_FLAGS([-fstack-protector-strong])

Unfortunately, some ports of the GNU toolchain reportedly pass this
test, then fail to link.  That's because the compiler accepts the
flag, duly emits references to helper code in libc (on my system:
___stack_chk_guard()), but libc doesn't provide, and linking fails.

A test covering this failure mode needs to compile and link code that
makes the compiler emit the canary.  Here's mine:

    int
    main(int argc, char *argv[])
    {
char arr[64], dst = arr, src = argv[0];
while ((*dst++ = *src++)) ;
    }

Unfortunately, AX_APPEND_LINK_FLAGS doesn't let me supply input
source.

The actual work is done by AX_CHECK_LINK_FLAG, which has an optional
INPUT argument.  I propose to add that to AX_APPEND_LINK_FLAGS, too.
For consistency, add it to AX_APPEND_COMPILE_FLAGS as well.

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #35519:  0001-AX_APPEND_COMPILE_FLAGS-AX_APPEND_LINK_FLAGS-Optiona.patch added by None (3KiB - text/x-diff - Proposed patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

     

     

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-02-29 simons Open/ClosedOpen Closed
    2016-02-29 simons StatusReady For Test Done
    2015-11-23 simons StatusNone Ready For Test
        Assigned toNone simons
    2015-11-22 None Attached File- Added 0001-AX_APPEND_COMPILE_FLAGS-AX_APPEND_LINK_FLAGS-Optiona.patch, #35519

    Back to the top


    Powered by Savane 3.9