One note: i presume the reason for having the "gcc" command be specified by
the variable LD-MAIN is because it can be nice to swap out the version of
gcc, such as when cross-compiling or when an older version of gcc is
required. If there's only one target that runs the linker, it's no problem
to change it there, but if more than one linked target comes along, it'd be
nice to have to change it only in one place. Typically, to handle this the
linker is specified with two or three variables, one for the link command
and one with the list of libraries that has to be appended to the command.

Just food for thought.

John

On Tue, Sep 6, 2011 at 11:58 AM, Alexander Burger <a...@software-lab.de>wrote:

> Hi Renaud,
>
> > Hi Alex, and thanks for your answer...
>
> No problem. I'm glad for your input.
>
>
> > -ldl is present in the Makefile, and also in the "complaining" invocation
> of
> > gcc :
> > gcc -m64 -rdynamic -lc -lm -ldl -o ../bin/picolisp x86-64.linux.base.o
>
> Hmm, looking at that, it occurs to me that the order of arguments to
> 'gcc' might be relevant: If it first processes "-ldl", and _then_
> "x86-64.linux.base.o", it might be too late to detect that certain
> functions from the library are needed.
>
> But if so, why did it work under Debian?
>
>
> Anyway, could you help me with a test? Change in Makefile
>
> 1. The line in the "Linux" condition
>
>      LD-MAIN = gcc -m64 -rdynamic -lc -lm -ldl
>
>   to
>
>      LD-MAIN = -m64 -rdynamic -lc -lm -ldl
>
>
> 2. The line in the "$(bin)/picolisp:" target
>
>      $(LD-MAIN) -o $(bin)/picolisp $(ARCH).$(SYS).base.o
>
>   to
>
>      gcc -o $(bin)/picolisp $(ARCH).$(SYS).base.o $(LD-MAIN)
>
>
> If it works with these changes, then we must also fix the corresponding
> LD-SHARED lines.
>
> Cheers,
> - Alex
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>



-- 
John Duncan
University of Georgia College of Veterinary Medicine
Class of 2012
SCAVMA Treasurer Emeritus
VBMA President Emeritus

Reply via email to