Project

General

Profile

Actions

Feature #14129

closed

Add NATIVE_CFLAGS64, NATIVE_CCFLAGS64, and rebind NATIVE*64

Added by Dan McDonald 4 months ago. Updated 3 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

While bringing up gcc10 on SmartOS/illumos-joyent, our out-of-order build strategy encountered a problem which can be reduced to:

gcc -m32 -D__amd64 prog.c

Now if gcc4 or gcc7 is used, a perfectly valid a.out will be produced, but with gcc10, this causes an error:

/export/home/danmcd/gcc10/proto/usr/include/sys/isa_defs.h:492:2: error: #error "Both _ILP32 and _LP64 are defined" 
  492 | #error "Both _ILP32 and _LP64 are defined" 
      |  ^~~~~

In our case, this is because NATIVE_CFLAGS and NATIVECC were used as 32-bit, along with 64-bit additional CFLAGS.

We need to create NATIVE_CFLAGS64, NATIVE_CCFLAGS64, AND add Makefile.master.64 entries for those plus NATIVECC and NATIVECCC.

This issue is most visible in libc's `genassym` generation.


Files

14129-stdout.txt (1.27 KB) 14129-stdout.txt Dan McDonald, 2021-10-02 03:33 AM
14129-full.txt (14.3 KB) 14129-full.txt Dan McDonald, 2021-10-02 03:33 AM
Actions #1

Updated by Dan McDonald 4 months ago

Test ran:

git clone ~/ws/illumos-gate experiment
fgbuild experiment.env
mv experiment before
git clone ~/ws/illumos-gate experiment
cd experiment
git am ~/14129.patch
cd ..
fgbuild experiment.env
mv experiment after
wsdiff -uvVr /tmp/14129-full.txt {before,after}/proto/root_i386 | & tee /tmp/14129-stdout.txt

The only differences were small two-byte changes in PYTHON artifacts. Files attached.

Actions #3

Updated by Electric Monk 3 months ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit 03c3ec9a6cdf985cb2478c06dc41ec851e474eca

commit  03c3ec9a6cdf985cb2478c06dc41ec851e474eca
Author: Dan McDonald <danmcd@joyent.com>
Date:   2021-10-06T15:38:12.000Z

    14129 Add NATIVE_CFLAGS64, NATIVE_CCFLAGS64, and rebind NATIVE*64
    Reviewed by: Toomas Soome <tsoome@me.com>
    Reviewed by: Andy Stormont <astormont@racktopsystems.com>
    Approved by: Robert Mustacchi <rm@fingolfin.org>

Actions

Also available in: Atom PDF