helpThe GNU Bourne-Again SHell - Support: sr #110505, Building the example builtins

 
 

sr #110505: Building the example builtins

Submitted by:  None
Submitted on:  Mon 07 Jun 2021 07:53:45 PM UTC
 
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  Done
Privacy:  Public Assigned to:  None
Originator Email:  -email is unavailable- Open/Closed:  Open
Operating System:  None
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       

 

Mon 07 Jun 2021 09:07:38 PM UTC, comment #1: 

Thanks for the report. I'm going with option 2.

Chet Ramey <chet>
Project Administrator
Mon 07 Jun 2021 07:53:45 PM UTC, original submission:  

I've tried building bash on AIX 6.1 with gcc, and it failed in examples/loadables with an "unknow option" error.

The workaround turned out to be this change:

diff --git a/examples/loadables/Makefile.in b/examples/loadables/Makefile.in
index be46121b..b275e2fb 100644
--- a/examples/loadables/Makefile.in
+++ b/examples/loadables/Makefile.in
@@ -87,7 +87,7 @@ CCFLAGS = $(DEFS) $(LOCAL_DEFS) $(LOCAL_CFLAGS) $(CPPFLAGS) $(CFLAGS)
 SHOBJ_CC = @SHOBJ_CC@
 SHOBJ_CFLAGS = @SHOBJ_CFLAGS@
 SHOBJ_LD = @SHOBJ_LD@
-SHOBJ_LDFLAGS = @SHOBJ_LDFLAGS@ @LDFLAGS@
+SHOBJ_LDFLAGS = @SHOBJ_LDFLAGS@
 SHOBJ_XLDFLAGS = @SHOBJ_XLDFLAGS@
 SHOBJ_LIBS = @SHOBJ_LIBS@
 SHOBJ_STATUS = @SHOBJ_STATUS@

The reason for this is that in support/shobj-conf SHOBJ_LD is set to 'ld', but LDFLAGS contains gcc-specific flags for linking (which can be passed to the linker using '-Wl,-linkerflag'). When this is directly given to the AIX linker, it's not recognized by it. In SHOBJ_LDFLAGS there are bare linker flags so that's not a problem.

I see 2 possible solutions:
1. Remove LDFLAGS from the invocation as I did - don't know if other platforms need it, on Linux I could build without it
2. Change support/shobj-conf so that for aix*-gcc it is ${CC} which is invoked as SHOBJ_LD, and the linker flags are prefixed with '-Wl,'.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by chet (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

     

     

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-06-07 chet StatusNone => Done

    Back to the top


    Powered by Savane 3.9