Bug 199367 - PATCH: sparc64 use CFLAGS
Summary: PATCH: sparc64 use CFLAGS
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: libselinux
Version: rawhide
Hardware: sparc64
OS: Linux
medium
high
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-07-19 03:28 UTC by Dennis Gilmore
Modified: 2007-11-30 22:11 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2007-09-24 15:56:58 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
use cflags (689 bytes, patch)
2006-07-19 03:28 UTC, Dennis Gilmore
no flags Details | Diff
use cflags patch (687 bytes, patch)
2007-07-11 12:43 UTC, Dennis Gilmore
no flags Details | Diff

Description Dennis Gilmore 2006-07-19 03:28:38 UTC
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-19 03:28:38 UTC
Created attachment 132647 [details]
use cflags

Comment 2 Daniel Walsh 2006-09-18 19:54:35 UTC
libselinux-1.30.28-1

Comment 3 Dennis Gilmore 2007-07-11 12:43:03 UTC
Created attachment 158944 [details]
use cflags patch

Comment 4 Dennis Gilmore 2007-07-11 12:44:40 UTC
repoening as this is present in libselinux-2.0.13-1.fc7

Comment 5 Daniel Walsh 2007-07-11 15:49:17 UTC
Steve is this acceptable upstream?

Comment 6 Dennis Gilmore 2007-07-11 16:00:31 UTC
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 16:17:00 UTC
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 16:25:20 UTC
(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 21:11:02 UTC
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 12:17:35 UTC
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 15:56:58 UTC
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.