[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[sr #110387] Document better where to put -m32 or -m64 compiler options
From: |
Bruno Haible |
Subject: |
[sr #110387] Document better where to put -m32 or -m64 compiler options |
Date: |
Tue, 1 Dec 2020 17:00:52 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:83.0) Gecko/20100101 Firefox/83.0 |
URL:
<https://savannah.gnu.org/support/?110387>
Summary: Document better where to put -m32 or -m64 compiler
options
Project: Autoconf
Submitted by: haible
Submitted on: Tue 01 Dec 2020 11:00:50 PM CET
Category: None
Priority: 5 - Normal
Severity: 3 - Normal
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Operating System: None
_______________________________________________________
Details:
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.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Tue 01 Dec 2020 11:00:50 PM CET Name:
0001-Document-better-where-to-put-m32-or-m64-compiler-opt.patch Size: 2KiB
By: haible
<http://savannah.gnu.org/support/download.php?file_id=50370>
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/support/?110387>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [sr #110387] Document better where to put -m32 or -m64 compiler options,
Bruno Haible <=