Project

General

Profile

Bug #10257

Build on sparc calls assembler incorrectly

Added by Peter Tribble 9 months ago. Updated 9 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
lib - userland libraries
Start date:
2019-01-17
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

Building on sparc fails with many of the follwoing in libbc:

/usr/ccs/bin/as -xregsym=no -P -D__STDC__ -DLOCORE -D_SYS_SYS_S -D_ASM -Dsparc
-I. -Iinc -I../inc/include -I../inc/include/sys -DTEXT_DOMAIN=\"SUNW_OST_OSLIB\"
-D_TS_ERRNO -I/export/home/ptribble/Illumos/test1-gate/proto/root_sparc/usr/in
clude -fpic -DPIC -K pic -DPIC ../libc/crt/sparc/misalign.s -o pics/misalig
n.o
/usr/ccs/bin/as: error: unknown option 'f'
/usr/ccs/bin/as: error: unknown option 'p'
usage: /usr/ccs/bin/as [-V] [-Q{y,n}] [-q] [-s]
[-S] [-K {pic,PIC}] [-o objfile] [-L] [-T]
[-P [[-Yc,path] [-Ipath] [-Dname] [-Dname=def] [-Uname]]...]
[-m [-Ym,path]] [-n] [-ul] [-xF]
[-m32] [-m64]
[-xarch={v7,v8,v8a,v8plus,v8plusa,v8plusb,v9,v9a,v9b,sparc,sparcvis, spa
rcvis2,sparcfmaf,sparcima}]
[-xcode={pic13,pic32}] file.s...
  • Error code 1

History

#1

Updated by Peter Tribble 9 months ago

The question is then why -fpic is being passed.

This is coming from

pics/%.o:= CPPFLAGS += $(C_PICFLAGS) -DPIC

And C_PICFLAGS is the source of -fpic

ASFLAGS includes CPPFLAGS, so it pick it up as well.

The simplest fix is to copy the contents of CPPFLAGS to ASFLAGS so that the later additions to CPPFLAGS don't propagate back to ASFLAGS.

#2

Updated by Electric Monk 9 months ago

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

git commit 874045b4f1bf22674537beed761f1586fd6dd52b

commit  874045b4f1bf22674537beed761f1586fd6dd52b
Author: Peter Tribble <peter.tribble@gmail.com>
Date:   2019-01-21T16:39:50.000Z

    10257 Build on sparc calls assembler incorrectly
    Reviewed by: John Levon <john.levon@joyent.com>
    Reviewed by: Gergő Mihály Doma <domag02@gmail.com>
    Reviewed by: Andy Stormont <astormont@racktopsystems.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF