chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Error with clang/FreeBSD


From: jrapdx0
Subject: Re: [Chicken-users] Error with clang/FreeBSD
Date: Fri, 15 Feb 2013 10:19:05 -0800

> ### FROM: Vitaly Magerya <address@hidden>
> ### ON: Fri, 15 Feb 2013 13:08:58 0200
>
> Felix wrote:
> >> -- csc-orig.scm 2013-02-12 20:47:23.194996000 -0800
> >> csc.scm 2013-02-12 20:47:23.194996000 -0800
> >> @@ -274,7 274,9 @@
> >> (else
> >> (list (conc "-L\"" library-dir "\""))))
> >> (if (and deployed (eq? (software-version) 'freebsd))
> >> - (list "-z origin")
> >> (if (string=? compiler "clang")
> >> (list "")
> >> (list "-z origin"))
> >> '())
> >> (cond ((get-environment-variable "CHICKEN_C_LIBRARY_PATH") =>
> >> (lambda (path)
> >>
> >
> > I'm not sure what to do here. The patch looks good but if this is a
> > bug in clang (as suggested by John), then should it be worked around
> > in csc?
>
> The correct thing to do here is to change '-z origin' into
> '-Wl,-z,origin'. This way both GCC and Clang will do the right thing.
>
> (I currently tested this by compiling C files; I'll be able to test csc
> modified that way in a dozen of hours or so, unless any of you folks do
> it first).
>

To test this out, I changed the patch to read
(if (string=? compiler "clang")
(list "-Wl,-z,origin")
(list "-z origin"))

After recompiling, and reinstalling, 'gmake check' passed without a hitch!

So assuming it works in gcc/FreeBSD as well (didn't have the time to try it), csc.scm should probably be changed to read:
(if (and deployed (eq? (software-version) 'freebsd))
(list "-Wl,-z,origin")
'())

However, I keep wondering how the version compiled without '-z origin' managed to pass the deployment test at all, if in fact '-z origin' is really necessary in order for the deployed application to find the necessary files. Is the test really testing this adequately, in other words, would an application have failed under "real-world" conditions despite passing the test?

Thanks,
J. Altfas.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]