ldemul options

Dmitry diwil@mail.ru
Fri Feb 28 13:07:00 GMT 2003


Hi Alan,

It seems to me, that 'ldemul.h' lacks "getopt.h" included.
(...at least under FreeBSD 4.X)

Is there a way to fix it?

gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU_SOURCE -I. -I. -I../bfd -I./../bfd 
-I./../include -I./../intl -I../intl  -g -O2 
-DLOCALEDIR="\"/usr/local/msp430//share/locale\""   -W -Wall 
-Wstrict-prototypes -Wmissing-prototypes -g -O2 -c ldemul.c
In file included from ldemul.c:30:
ldemul.h:57: warning: `struct option' declared inside parameter list
ldemul.h:57: warning: its scope is only this definition or declaration, which 
is probably not what you want.
ldemul.h:156: warning: `struct option' declared inside parameter list
ldemul.c: In function `ldemul_add_options':
ldemul.c:144: argument `longopts' doesn't match prototype
ldemul.h:57: prototype declaration
ldemul.c:144: argument `really_longopts' doesn't match prototype
ldemul.h:57: prototype declaration
ldemul.c:147: warning: passing arg 4 of pointer to function from incompatible 
pointer type
ldemul.c:147: warning: passing arg 6 of pointer to function from incompatible 
pointer type
gmake[2]: *** [ldemul.o] error 1
gmake[2]: Выход из каталог `/usr/home/diwil/MSP430/SF/current-gnu/binutils/ld'
gmake[1]: *** [all-recursive] error 1
gmake[1]: Выход из каталог `/usr/home/diwil/MSP430/SF/current-gnu/binutils/ld'
gmake: *** [all-recursive-am] error 2


Or I just missed something?

Thanks,
Dmitry.


On Friday 28 February 2003 04:33, Alan Modra wrote:
> This patch gets rid of the emulation specific getopt_long calls, and
> instead arranges for emulation specific options to be added to
> getopt_long params in lexsup.c.  Means we don't have to worry about
> the silly duplication of long options, and abbreviations will work.
> ldemul_parse_args could disappear, except that it's still used by
> aix.em to munge argv.
>
> 	* ldemul.c (ldemul_add_options, ldemul_handle_option): New functions.
> 	(ldemul_parse_args): Return bfd_boolean.  Formatting.
> 	* ldemul.h (ldemul_add_options, ldemul_handle_option): Declare.
> 	(ldemul_parse_args): Adjust.
> 	(struct ld_emulation_xfer_struct): Add add_options and handle_option.
> 	Return bfd_boolean from parse_args.
> 	* lexsup.c (parse_args): Malloc shortopts, longopts and
> 	really_longopts.  Call ldemul_add_options and ldemul_handle_option.
> 	* emultempl/aix.em (gld${EMULATION_NAME}_add_options): Split out from
> 	gld${EMULATION_NAME}_parse_args.
> 	(gld${EMULATION_NAME}_handle_option): Likewise.
> 	(ld_${EMULATION_NAME}_emulation): Adjust initializer.
> 	* emultempl/armcoff.em: As for aix.em, but remove parse_args.
> 	* emultempl/beos.em: Likewise.
> 	* emultempl/pe.em: Likewise.
> 	* emultempl/ticoff.em: Likewise.
> 	* emultempl/elf32.em: Likewise.  Don't duplicate long options either.
> 	(gld${EMULATION_NAME}_add_sysroot): Prototype.
> 	* emultempl/armelf.em (PARSE_AND_LIST_LONGOPTS): Don't duplicate
> 	options.
> 	* emultempl/hppaelf.em (PARSE_AND_LIST_LONGOPTS): Likewise.
> 	* emultempl/ppc32elf.em (PARSE_AND_LIST_LONGOPTS): Likewise.
> 	* emultempl/ppc64elf.em (PARSE_AND_LIST_LONGOPTS): Likewise.
> 	* emultempl/armelf_oabi.em (ld_${EMULATION_NAME}_emulation): Adjust
> 	initializer.
> 	* emultempl/generic.em: Likewise.
> 	* emultempl/gld960.em: Likewise.
> 	* emultempl/gld960c.em: Likewise.
> 	* emultempl/linux.em: Likewise.
> 	* emultempl/lnk960.em: Likewise.
> 	* emultempl/m68kcoff.em: Likewise.
> 	* emultempl/mipsecoff.em: Likewise.
> 	* emultempl/sunos.em: Likewise.
> 	* emultempl/vanilla.em: Likewise.
> 	* emultempl/netbsd.em (gldnetbsd_before_parse): Prototype.




More information about the Binutils mailing list