helpAutoconf - Support: sr #110387, Document better where to put -m32...

 
 

sr #110387: Document better where to put -m32 or -m64 compiler options

Submitter:  Bruno Haible <haible>
Submitted:  Tue 01 Dec 2020 10:00:50 PM UTC
 
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  Done
Privacy:  Public Assigned to:  None
Open/Closed:  Closed Operating System:  None
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       

 

Tue 01 Dec 2020 11:20:25 PM UTC, comment #1: 

Thanks for the documentation improvement; I installed it.

Paul Eggert <eggert>
Project Administrator
Tue 01 Dec 2020 10:00:50 PM UTC, original submission:  

The section about CFLAGS in section "Preset Output Variables" https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Preset-Output-Variables.html was written in 2006, see https://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=63b0709b9482f1a282d584239d3bcb016633d7cf .

This text considers the habits of Makefile authors and of Automake, when to use CC with CFLAGS and CPPFLAGS (namely for preprocessing and compiling to object files) vs. CC with CFLAGS and LDFLAGS (namely for linking).

However, another use of CC is in config.guess, when the user has not provided a --host option. Here, at least nowadays, CC is used without CFLAGS, CPPFLAGS, nor LDFLAGS.

This variable is used on GNU/Linux, Solaris, HP-UX systems to determine whether the build produces 32-bit or 64-bit binaries, and sets the host_cpu portion of the config.guess result accordingly. See https://lists.gnu.org/archive/html/config-patches/2018-12/msg00012.html .

When users put -m32 or -m64 options into variables other than CC, this detection does not work and causes problems thereafter. See https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00012.html for an example.

Find attached a patch to the Autoconf documentation, to make it clear that -m32 or -m64 options need to go into CC.

Bruno Haible <haible>

 

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

Attach Files:
   
   
Comment:
   

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by eggert (Posted a comment)
  • -email is unavailable- added by haible (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.

    Only logged-in users can vote.

     

     

     

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-12-01 eggert StatusNone Done
        Open/ClosedOpen Closed
    2020-12-01 haible Attached File- Added 0001-Document-better-where-to-put-m32-or-m64-compiler-opt.patch, #50370

    Back to the top


    Powered by Savane 3.9