Bug 199367 - PATCH: sparc64 use CFLAGS
PATCH: sparc64 use CFLAGS
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: libselinux (Show other bugs)
rawhide
sparc64 Linux
medium Severity high
: ---
: ---
Assigned To: Daniel Walsh
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-07-18 23:28 EDT by Dennis Gilmore
Modified: 2007-11-30 17:11 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-09-24 11:56:58 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
use cflags (689 bytes, patch)
2006-07-18 23:28 EDT, Dennis Gilmore
no flags Details | Diff
use cflags patch (687 bytes, patch)
2007-07-11 08:43 EDT, Dennis Gilmore
no flags Details | Diff

  None (edit)
Description Dennis Gilmore 2006-07-18 23:28:38 EDT
Description of problem:
sparc64 needs to use CFLAGS with CC to link properly using gcc the attached 
patch fixes this issue

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 Dennis Gilmore 2006-07-18 23:28:38 EDT
Created attachment 132647 [details]
use cflags
Comment 2 Daniel Walsh 2006-09-18 15:54:35 EDT
libselinux-1.30.28-1
Comment 3 Dennis Gilmore 2007-07-11 08:43:03 EDT
Created attachment 158944 [details]
use cflags patch
Comment 4 Dennis Gilmore 2007-07-11 08:44:40 EDT
repoening as this is present in libselinux-2.0.13-1.fc7
Comment 5 Daniel Walsh 2007-07-11 11:49:17 EDT
Steve is this acceptable upstream?
Comment 6 Dennis Gilmore 2007-07-11 12:00:31 EDT
I have a patch for libsepol also.  It does the same thing.  Since your using 
gcc to link  you need to use CFLAGS  to ensure that the libraries are 
correctly linked always.
Comment 7 Stephen Smalley 2007-07-11 12:17:00 EDT
It's ok by me, although I'm wondering what CFLAGS you are supplying that matter
here.
Comment 8 Tom "spot" Callaway 2007-07-11 12:25:20 EDT
(In reply to comment #7)
> It's ok by me, although I'm wondering what CFLAGS you are supplying that matter
> here.

For multilib support, sparc needs libselinux (and libsepol) to be built as sparc
(32bit) and sparc64 (64bit). sparc builds fine (-m32 is assumed by the
compiler), but when building for sparc64, we need all compile and link
operations to have -m64 passed for it, or else gcc will mismatch (it will make
sparc64 object files, then try to link them as a 32bit library) and the build fails.

The easiest way to ensure safe and consistent builds is to universally apply
CFLAGS whenever calling CC, which is what this patch does.
Comment 9 Tom "spot" Callaway 2007-09-22 17:11:02 EDT
This is _still_ not applied. We're going on over a year for this bug being open.
Please apply this patch, or if not, explain why?

This breaks sparc64, and we need to build libselinux (and libsepol, which has
the same failure) as sparc64 in order to build gcc.

$(LDFLAGS) is not sufficient, we need $(CFLAGS), since it invokes $(CC).
Comment 10 Stephen Smalley 2007-09-24 08:17:35 EDT
Patch was never posted to selinux list?
Red Hat bugzilla isn't the right place for upstream fixes?
Comment 11 Daniel Walsh 2007-09-24 11:56:58 EDT
Built into rawhide.  Will backport in f7.

Submitted an updated patch to upstream.

Note You need to log in before you can comment on or make changes to this bug.