unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Tomas Cech <sleep_walker@suse.cz>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH] gnu: luajit: Add -fPIC into CFLAGS.
Date: Tue, 16 Dec 2014 22:08:01 +0100	[thread overview]
Message-ID: <87zjanpaku.fsf@gnu.org> (raw)
In-Reply-To: <87zjanwg1p.wl%sleep_walker@suse.cz> (Tomas Cech's message of "Tue, 16 Dec 2014 20:28:02 +0100")

Tomas Cech <sleep_walker@suse.cz> skribis:

> At Tue, 16 Dec 2014 18:08:10 +0100,
> Ludovic Courtès wrote:
>> 
>> Tomáš Čech <sleep_walker@suse.cz> skribis:
>> 
>> > * gnu/packages/lua.scm (luajit): Add -fPIC into CFLAGS and pass it to make.
>> 
>> [...]
>> 
>> > --- a/gnu/packages/lua.scm
>> > +++ b/gnu/packages/lua.scm
>> > @@ -92,7 +92,8 @@ for configuration, scripting, and rapid prototyping.")
>> >      (arguments
>> >       '(#:tests? #f                      ;luajit is distributed without tests
>> >         #:phases (alist-delete 'configure %standard-phases)
>> > -       #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))))
>> > +       #:make-flags (list (string-append "CFLAGS=-fPIC " (or (getenv "CFLAGS") ""))
>> > +                          (string-append "PREFIX=" (assoc-ref %outputs "out")))))
>> 
>> Could you add a comment explaining why this is needed?
>
> OK, I'll do. But I don't know details and linking during build of EFL
> failed when this was missing. Is this level of explanation sufficient?

Interestingly luajit contains both a .so and a .a; src/Makefile has the
rule to build .o files:

--8<---------------cut here---------------start------------->8---
%.o: %.c
	$(E) "CC        $@"
	$(Q)$(TARGET_DYNCC) $(TARGET_ACFLAGS) -c -o $(@:.o=_dyn.o) $<
	$(Q)$(TARGET_CC) $(TARGET_ACFLAGS) -c -o $@ $<
--8<---------------cut here---------------end--------------->8---

Where $(TARGET_DYNCC) does use -fPIC.

So it all looks normal.  What’s the exact error you were getting when
building EFL?

>> Normally I would expect the makefiles to already contain that flag if
>> it’s needed.
>
> Btw. it was already added to lua variable in the same file so I'm at
> least consistent within file ;)

Right, commit c361d075d3 provided a similar fix for Lua itself.  It
looks like there’s a pattern of being unable to build a shared library.
:-)

Thanks,
Ludo’.

  reply	other threads:[~2014-12-16 21:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-15 22:52 [PATCH] gnu: luajit: Add -fPIC into CFLAGS Tomáš Čech
2014-12-16 17:08 ` Ludovic Courtès
2014-12-16 19:28   ` Tomas Cech
2014-12-16 21:08     ` Ludovic Courtès [this message]
2014-12-16 21:42       ` Tomas Cech
2014-12-16 22:15         ` Ludovic Courtès
2014-12-27 12:08           ` Tomas Cech
2015-01-07 20:14             ` Ludovic Courtès
2015-01-28 20:31               ` Tomas Cech
2015-02-01 14:43                 ` [PATCH] gnu: luajit: don't require ldconfig Tomáš Čech
2015-02-01 19:07                   ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zjanpaku.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=sleep_walker@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).