Operating System - HP-UX
1836401 Members
3134 Online
110100 Solutions
New Discussion

GCC 4.0.0 -mhp-ld Support

 
SOLVED
Go to solution
Kevin Schultz
Advisor

GCC 4.0.0 -mhp-ld Support

Dear IT forums community,

This is my first post. Thanks everyone for your support of this resource, especially A. Clay Stephenson and H. Merijn. It has helped me a lot with successfully compiling and installing GCC 4.0.0 from source.

I am learning about GCC CFLAGS options, and I note option "-mhp-ld" on "http://gcc.gnu.org/onlinedocs/gcc-4.0.0/gcc/HPPA-Options.html#HPPA-Options"

which says that it should work.

When I compile test program:

************************
* BEGIN PROGRAM
************************
/* confdefs.h. */

#define PACKAGE_NAME "GNU Texinfo"
#define PACKAGE_TARNAME "texinfo"
#define PACKAGE_VERSION "4.8"
#define PACKAGE_STRING "GNU Texinfo 4.8"
#define PACKAGE_BUGREPORT ""
#define PACKAGE "texinfo"
#define VERSION "4.8"
/* end confdefs.h. */

int
main ()
{

;
return 0;
}
************************
* END PROGRAM
************************

with the command:

/usr/local/bin/gcc -O2 -mpa-risc-2-0 -mschedule=8000 -munix=95 -mhp-ld -static -Dhpux -DSYSV -D_HPUX_SOURCE -D_POSIX_C_SOURCE=199506L -D_POSIX_D10_THREADS conftest.c

it reports:

cc1: error: invalid option 'hp-ld'

shell returned 1


I am running on HPUX 11.00:

uname -a
HP-UX voltaire B.11.00 U 9000/785 2015073023 unlimited-user license

with gcc-4.0.0:
:!/usr/local/bin/gcc -v
Using built-in specs.
Target: hppa2.0w-hp-hpux11.00
Configured with: ../gcc-4.0.0/configure --prefix=/usr/local/pa20_32 --with-gnu-as --with-as=/usr/local/pa20_32/bin/as --disable-nls --with-gmp=/usr/local/pa20_32 --with-mpfr=/usr/local/pa20_32 --disable-shared --enable-languages=c,c++,objc
Thread model: single
gcc version 4.0.0



This option seems like it should be available...but I get an error. Thanks for any feedback.

Best regards,



Kevin Schultz
Roseville, CA
3 REPLIES 3
H.Merijn Brand (procura
Honored Contributor
Solution

Re: GCC 4.0.0 -mhp-ld Support

I don't know about that option, but to see *all* options supported by the current build, use

sh$ gcc -v --help 2>&1 | less
csh% gcc -v --help |& less

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Kevin Schultz
Advisor

Re: GCC 4.0.0 -mhp-ld Support


Thanks H. Merijn! :)

I do not see it in the list when I grep for it. It seems like a bug in the documentation, unless I am missing something. Perhaps it was removed or has not been implemented.

Best regards,



Kevin
Steve Ellcey
Valued Contributor

Re: GCC 4.0.0 -mhp-ld Support

I looked through the GCC code and it appears that the -mhp-ld option is only recognized by the hppa64*-*-* versions of GCC. I.e. when compiling for 64 bits. It is not recognized for 32 bits. The GCC document shows all the options for all the various hppa* platforms but it does not really make it clear that not all options are recognized on all the targets for that platform. Note that when on HP-UX, the
use of the HP linker is the default so use of this option is not really needed.