public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug modula2/108462] duplicate install of static libraries
Date: Mon, 23 Jan 2023 09:47:23 +0000	[thread overview]
Message-ID: <bug-108462-4-uarSYOGUgW@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-108462-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108462

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
OK, so besides the relocation issue it seems that search paths (or install
paths) are wrong (because of my changes?).  Configuring with
--prefix=/tmp/install and doing

> /tmp/install/bin/gm2 -fiso coroutine.mod   
<built-in>: error: the file containing the definition module 'SYSTEM' cannot be
found

because adding -v reveals

 /tmp/install/lib/gcc/x86_64-pc-linux-gnu/13.0.1/cc1gm2
-iplugindir=/tmp/install/lib64/gcc/x86_64-pc-linux-gnu/13.0.1/plugin -quiet
-dumpdir a- -dumpbase coroutine.mod -dumpbase-ext .mod -mtune=generic
-march=x86-64 -version -fiso -fgen-module-list=- -fplugin=m2rte -fiso
-fgen-module-list=- -fplugin=m2rte -I
/tmp/install/lib64/gcc/x86_64-pc-linux-gnu/13.0.1/m2/m2iso -I
/tmp/install/lib64/gcc/x86_64-pc-linux-gnu/13.0.1/m2/m2pim -v coroutine.mod -o
/tmp/ccwuuAId.s

but

> find install -iname system.mod
install/lib64/m2/m2pim/SYSTEM.mod
install/lib64/m2/m2iso/SYSTEM.mod
install/lib64/m2/m2cor/SYSTEM.mod
install/lib64/m2/m2min/SYSTEM.mod
install/lib/m2/m2pim/SYSTEM.mod
install/lib/m2/m2iso/SYSTEM.mod
install/lib/m2/m2cor/SYSTEM.mod
install/lib/m2/m2min/SYSTEM.mod

so the frontend/driver expect the m2/m2{pim,iso,cor,min} dirs to be in
a version specific directory.

libgfortran for example uses

cafexeclib_LTLIBRARIES = libcaf_single.la
cafexeclibdir = $(libdir)/gcc/$(target_alias)/$(gcc_version)$(MULTISUBDIR)

my r13-5284-ge61d43791e0943 changed

-       $(INSTALL_DATA) .libs/libm2iso.a
$(DESTDIR)$(inst_libdir)/$(MULTIDIR)$(M2LIBDIR)
+       $(INSTALL_DATA) .libs/libm2iso.la
$(DESTDIR)$(toolexeclibdir)$(M2LIBDIR)

fighting a duplicate MULTIDIR, maybe I should have just removed $(MULTIDIR)
here, inst_libdir is

libsubdir = $(libdir)/gcc/$(target_alias)/$(gcc_version)
inst_libdir = $(libsubdir)$(MULTISUBDIR)

which looks possibly correct.  I'm going to test that.

  parent reply	other threads:[~2023-01-23  9:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-19 10:41 [Bug modula2/108462] New: " rguenth at gcc dot gnu.org
2023-01-19 14:26 ` [Bug modula2/108462] " gaius at gcc dot gnu.org
2023-01-19 15:01 ` gaius at gcc dot gnu.org
2023-01-20 14:55 ` gaius at gcc dot gnu.org
2023-01-23  9:47 ` rguenth at gcc dot gnu.org [this message]
2023-01-23 10:08 ` rguenth at gcc dot gnu.org
2023-01-31 14:55 ` cvs-commit at gcc dot gnu.org
2023-01-31 14:56 ` rguenth at gcc dot gnu.org

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

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

  git send-email \
    --in-reply-to=bug-108462-4-uarSYOGUgW@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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.
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).