cancel
Showing results for 
Search instead for 
Did you mean: 

gcc to aCC

 
SOLVED
Go to solution
Highlighted
New Member

gcc to aCC

Hi,
I have to build binutils tool in hp-ux system using aCC compiler.
In the Makefile it is exicuted using gcc like

gcc -DHAVE_CONFIG_H -I. -I.././binutils -I. -D_GNU_SOURCE -I. -I.././binutils -I../
bfd -I.././binutils/../bfd -I.././binutils/../include -D_LARGEFILE64_SOURCE -I./../
intl -DLOCALEDIR="\"/home/srikrish/sharma/binutils/binutilsTarget/share/locale\"" -
Dbin_dummy_emulation=bin_vanilla_emulation -D_LARGEFILE64_SOURCE -W -Wall -Wstric
t-prototypes -Wmissing-prototypes -Werror -g -O2 -c objcopy.c

this works fine.But i want to work in aCC

I changed gcc to aCC . but i got errors like

aCC -DHAVE_CONFIG_H -I. -I.././binutils -I. -D_GNU_SOURCE -I. -I.././binutils -I../
bfd -I.././binutils/../bfd -I.././binutils/../include -D_LARGEFILE64_SOURCE -I./../
intl -DLOCALEDIR="\"/home/srikrish/sharma/binutils/binutilsTarget/share/locale\"" -
Dbin_dummy_emulation=bin_vanilla_emulation -D_LARGEFILE64_SOURCE -W -Wall -Wstric
t-prototypes -Wmissing-prototypes -Werror -g -O2 -c size.c
aCC: error 1914: bad form for `-W' option
gmake[2]: *** [size.o] Error 1.


If i remove the -W (Warnig options) then it gives some errors like Undifind symblols etc.....

plz help me to give aCC in Makefile.


5 REPLIES 5
Highlighted
Acclaimed Contributor
Solution

Re: gcc to aCC

>I have to build binutils tool in hp-ux system using aCC compiler.

What OS version and what version of aC++ do you have?

>I changed gcc to aCC but I got errors like

You should also add -Ae to switch to C mode. And you'll need to remove all foreign devil gcc options. Or configure binutils to build with aCC. One simple way to do that is tell config that your C compiler is an absolute path of some script called cc. Then in that dummy cc script:
#!/usr/bin/ksh
eval aCC -Ae "$@"

>then it gives some errors like Undefined symbols etc.

Because binutils code is likely broken and isn't fully prototyped.
Highlighted
Honored Contributor

Re: gcc to aCC

> I changed gcc to aCC . but [...]

Is there any reason you didn't try to specify
the compiler the _right_ way, namely at
"configure" time? "./configure --help":

[...]
Some influential environment variables:
CC C compiler command
[...]


For example:

CC=cc ./configure

Or, try reading README?
Highlighted
New Member

Re: gcc to aCC

Hi,
hp-ux os version : 11.23i.
aCC version : aCC: HP C/aC++ B3910B A.06.17 [Mar 4 2008].

Now i tried CC=cc ./configure.
it sucessfuly configured.
But wlile giving gmake cmd i got the error like :

"elflink.c", line 11826: warning #4232-D: conversion from
"struct bfd_link_hash_table *" to a more strictly aligned type
"struct elf_link_hash_table *" may cause misaligned access
elf_link_hash_traverse (elf_hash_table (info),
^

1 error detected in the compilation of "elflink.c".
gmake[4]: *** [elflink.lo] Error 1
gmake[4]: Leaving directory `/home/srikrish/sharma/binutils/binutils-2.18/bfd'
gmake[3]: *** [all-recursive] Error 1
gmake[3]: Leaving directory `/home/srikrish/sharma/binutils/binutils-2.18/bfd'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/home/srikrish/sharma/binutils/binutils-2.18/bfd'
gmake[1]: *** [all-bfd] Error 2
gmake[1]: Leaving directory `/home/srikrish/sharma/binutils/binutils-2.18'
gmake: *** [all] Error 2

Can u help me to solve this problem ?

-------------
Regards
Krish
--------------
Highlighted
Honored Contributor

Re: gcc to aCC

> [...] warning #4232-D: [...]

> 1 error detected [...]

A "warning" stopped it? Or was there an
actual "error", too?
Highlighted
Acclaimed Contributor

Re: gcc to aCC

>aCC version: aCC: HP C/aC++ B3910B A.06.17 [Mar 4 2008].
>Now i tried CC=cc ./configure. it successfully configured.

If you have A.06.17, you have the corresponding C compiler in /opt/aCC/bin/cc. You're now using it.

>Steven: A "warning" stopped it? Or was there an actual "error", too?

Exactly, where is the error?