Patchwork fix build of cross-compiler to AIX

login
register
mail settings
Submitter Steven Bosscher
Date Feb. 14, 2013, 12:16 p.m.
Message ID <CABu31nMghAcdkh_dgD7UKkaDyE0qm9L0QNg2rKeqB1q4xNvAkQ@mail.gmail.com>
Download mbox | patch
Permalink /patch/220430/
State New
Headers show

Comments

Steven Bosscher - Feb. 14, 2013, 12:16 p.m.
Hello,

Building a cross-compiler from powerpc-linux to powerpc-aix fails with:

../../combined/gcc/collect2.c: In function 'void scan_prog_file(const
char*, scanpass, scanfilter)':
../../combined/gcc/collect2.c:2860:8: error: 'F_LOADONLY' was not
declared in this scope

This is due to:
2013-02-03  David Edelsohn  <>
            Andrew Dixie  <>

        * collect2.c (GCC_CHECK_HDR): Do not scan objects with F_LOADONLY
        flag set.


Attached patch adds the definition, taken from the AIX 7.1 Information Center
(http://pic.dhe.ibm.com/infocenter/aix/v7r1/index.jsp?topic=/com.ibm.aix.files/doc/aixfiles/XCOFF.htm)

OK for trunk?

Ciao!
Steven



        * collect2-aix.h: Define F_LOADONLY.
Richard Guenther - Feb. 14, 2013, 12:53 p.m.
On Thu, Feb 14, 2013 at 1:16 PM, Steven Bosscher <stevenb.gcc@gmail.com> wrote:
> Hello,
>
> Building a cross-compiler from powerpc-linux to powerpc-aix fails with:
>
> ../../combined/gcc/collect2.c: In function 'void scan_prog_file(const
> char*, scanpass, scanfilter)':
> ../../combined/gcc/collect2.c:2860:8: error: 'F_LOADONLY' was not
> declared in this scope
>
> This is due to:
> 2013-02-03  David Edelsohn  <>
>             Andrew Dixie  <>
>
>         * collect2.c (GCC_CHECK_HDR): Do not scan objects with F_LOADONLY
>         flag set.
>
>
> Attached patch adds the definition, taken from the AIX 7.1 Information Center
> (http://pic.dhe.ibm.com/infocenter/aix/v7r1/index.jsp?topic=/com.ibm.aix.files/doc/aixfiles/XCOFF.htm)
>
> OK for trunk?

Ok.

Thanks,
Richard.

> Ciao!
> Steven
>
>
>
>         * collect2-aix.h: Define F_LOADONLY.
>
> Index: collect2-aix.h
> ===================================================================
> --- collect2-aix.h      (revision 196048)
> +++ collect2-aix.h      (working copy)
> @@ -229,7 +229,8 @@
>  /* Definitions required by collect2.  */
>  #define C_EXT 2
>
> -#define F_SHROBJ 0x2000
> +#define F_SHROBJ    0x2000
> +#define F_LOADONLY  0x4000
>
>  #define N_UNDEF ((short) 0)
>  #define N_TMASK 060
David Edelsohn - Feb. 14, 2013, 1:13 p.m.
On Thu, Feb 14, 2013 at 7:16 AM, Steven Bosscher <stevenb.gcc@gmail.com> wrote:
> Hello,
>
> Building a cross-compiler from powerpc-linux to powerpc-aix fails with:
>
> ../../combined/gcc/collect2.c: In function 'void scan_prog_file(const
> char*, scanpass, scanfilter)':
> ../../combined/gcc/collect2.c:2860:8: error: 'F_LOADONLY' was not
> declared in this scope
>
> This is due to:
> 2013-02-03  David Edelsohn  <>
>             Andrew Dixie  <>
>
>         * collect2.c (GCC_CHECK_HDR): Do not scan objects with F_LOADONLY
>         flag set.
>
>
> Attached patch adds the definition, taken from the AIX 7.1 Information Center
> (http://pic.dhe.ibm.com/infocenter/aix/v7r1/index.jsp?topic=/com.ibm.aix.files/doc/aixfiles/XCOFF.htm)
>
> OK for trunk?
>
> Ciao!
> Steven
>
>
>
>         * collect2-aix.h: Define F_LOADONLY.

Okay.

Thanks, David

Patch

Index: collect2-aix.h
===================================================================
--- collect2-aix.h      (revision 196048)
+++ collect2-aix.h      (working copy)
@@ -229,7 +229,8 @@ 
 /* Definitions required by collect2.  */
 #define C_EXT 2

-#define F_SHROBJ 0x2000
+#define F_SHROBJ    0x2000
+#define F_LOADONLY  0x4000

 #define N_UNDEF ((short) 0)
 #define N_TMASK 060