invoking ld(1) with -z ld32=arg when arg takes a comma

invoking ld(1) with -z ld32=arg when arg takes a comma

Post by Frank Cusac » Sun, 30 May 2004 09:01:26



I want to set the default library search path (-YP) however as pointed
out in another thread ld doesn't automatically append 32|64 to each
path element.  To pass class-specific arguments, you invoke ld like so:

  ld -z ld32=arg1,arg2,...

however 'ld -z ld32=-Y,P,foo:bar' fails with

  ld: fatal: option -Y has illegal argument `P'
  ld: fatal: Flags processing errors

... of course, since the ld32 arg parsing eliminates the comma and treats
this as 3 args instead of 2.  I'd prefer not to play with env. vars.
Any way to work around this?  Should be a fairly trivial patch to ld
to allow it to handle '-Y P,' *cough*.

I can't pass -L arguments because they aren't searched the same way.

/fc

 
 
 

invoking ld(1) with -z ld32=arg when arg takes a comma

Post by Frank Cusac » Sun, 30 May 2004 10:12:23



Quote:> however 'ld -z ld32=-Y,P,foo:bar' fails with

>   ld: fatal: option -Y has illegal argument `P'
>   ld: fatal: Flags processing errors

> ... of course, since the ld32 arg parsing eliminates the comma and treats
> this as 3 args instead of 2.  I'd prefer not to play with env. vars.
> Any way to work around this?

ha, I can just pass '-YP,path:path/64' and ld will only find the
correct class-specific libraries.

/fc

 
 
 

1. /bin/sh: VAR=function arg arg ? (possible?)

I'm trying to set a variable equal to the return code of a function call
with multiple arguments.  e.g.,

VARIABLE=function arg1 arg2 ... argn

Unfortunately, the Bourne shell seems to spit upon all the various forms
of syntax I've tried.  Is there a way to do this?  The only thing I've been
able to get to work is:

function arg1 arg2 ... argn
VARIABLE=$?

...but that method is awfully ugly.  I was expecting a form of quoting or
something which will allow the function call to be executed without giving
me ugly errors.

I've checked the FAQ, as well as the Bourne (and Korn) shell manuals we have
here in the office, to no avail.  

Help?

Thanks,
LC

2. Dioes egcs suck?

3. ld's -M mapfile arg

4. lately, games behave around solid doorways, unless they're sweet

5. arg list too long: help?

6. XML parser for RSS schema Scipt

7. /bin/ls: arg list too long

8. netbsd on Apple iBook ?

9. ps arg list chopped at 80 characters

10. Remove "cpu" arg to cpu_raise_softirq().

11. Arg list too long

12. X Keyboard Setup: AltGr+# = (Arg: #)

13. grep: cannot execute [Arg list too long] ???