This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] gcc-2.95 make install prefix=... broken with multilibs (was: Re: Makefiles advice needed...)
- To: egcs-patches at egcs dot cygnus dot com
- Subject: [PATCH] gcc-2.95 make install prefix=... broken with multilibs (was: Re: Makefiles advice needed...)
- From: Daniel Jacobowitz <drow at false dot org>
- Date: Thu, 15 Jul 1999 12:08:09 -0400
- References: <19990614100823.A16240@drow.res.cmu.edu> <19990614161646.A10128@drow.res.cmu.edu>
On Mon, Jun 14, 1999 at 04:16:46PM -0400, Daniel Jacobowitz wrote:
> Answering my own question...
>
> Passing the prefix variables solves the problem. Patch attached.
>
> On Mon, Jun 14, 1999 at 10:08:23AM -0400, Daniel Jacobowitz wrote:
> > Before I bother to produce a patch, which I'm not sure at all would
> > resolve the problem, I'd like some advice. A lot of gcc's Makefils
> > include ${prefix} and its relatives in ${FLAGS_TO_PASS} or the
> > equivalent - but also, a lot of other Makefiles don't. This is (I
> > suspect) the cause of my recurring problem with multilib builds; the
> > multilibbed copy of libiberty invariably gets installed in the
> > configure-time, not install-time, ${prefix}. Is ${prefix} propogated
> > some other way than through this variable?
Now that alpha is multilibbed, this problem shows up there as well:
Chris C Chimelis wrote:
> Found a problem. Looks like someone left something out of a Makefile:
>
> make[4]: Entering directory `/src/gcc-ss/gcc-snapshot-19990714/builddir/alpha-debian-linux-gnu/ieee/libiberty'
> make[5]: Entering directory `/src/gcc-ss/gcc-snapshot-19990714/builddir/alpha-debian-linux-gnu/ieee/libiberty/testsuite'
> make[5]: Nothing to be done for `all'.
> make[5]: Leaving directory `/src/gcc-ss/gcc-snapshot-19990714/builddir/alpha-debian-linux-gnu/ieee/libiberty/testsuite'
> install -p -m 644 libiberty.a /usr/lib/gcc-ss/lib/ieee/libiberty.a.n
> install: cannot create regular file `/usr/lib/gcc-ss/lib/ieee/libiberty.a.n': No such file or directory
> make[4]: *** [install_to_libdir] Error 1
> make[4]: Leaving directory `/src/gcc-ss/gcc-snapshot-19990714/builddir/alpha-debian-linux-gnu/ieee/libiberty'
> make[3]: *** [multi-do] Error 1
> make[3]: Leaving directory `/src/gcc-ss/gcc-snapshot-19990714/builddir/alpha-debian-linux-gnu/libiberty'
> make[2]: *** [install_to_libdir] Error 2
> make[2]: Leaving directory `/src/gcc-ss/gcc-snapshot-19990714/builddir/alpha-debian-linux-gnu/libiberty'
> make[1]: *** [install-target-libiberty] Error 2
> make[1]: Leaving directory `/src/gcc-ss/gcc-snapshot-19990714/builddir'
> make: *** [install-stamp] Error 2
>
>
> Obviously, we don't want to install libiberty.a to
> /usr/lib/gcc-ss/lib/ieee/libiberty.a.n
> :-)
>
> C
Can someone please comment on the proposed patch, attached again, or at
least offer an alternate solution?
Dan
/--------------------------------\ /--------------------------------\
| Daniel Jacobowitz |__| SCS Class of 2002 |
| Debian GNU/Linux Developer __ Carnegie Mellon University |
| dan@debian.org | | dmj+@andrew.cmu.edu |
\--------------------------------/ \--------------------------------/
diff -ur orig/libchill/Makefile.in new/libchill/Makefile.in
--- orig/libchill/Makefile.in Mon Jun 14 14:59:51 1999
+++ new/libchill/Makefile.in Mon Jun 14 16:16:07 1999
@@ -194,7 +194,12 @@
"LOADLIBES=$(LOADLIBES)" \
"PICFLAG=$(PICFLAG)" \
"RANLIB=$(RANLIB)" \
- "SHELL=$(SHELL)"
+ "SHELL=$(SHELL)" \
+ "prefix=$(prefix)" \
+ "exec_prefix=$(exec_prefix)" \
+ "libdir=$(libdir)" \
+ "libsubdir=$(libsubdir)" \
+ "tooldir=$(tooldir)"
all: chillrt0.o libchill.a
@$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=all
diff -ur orig/libf2c/Makefile.in new/libf2c/Makefile.in
--- orig/libf2c/Makefile.in Mon Jun 14 14:59:51 1999
+++ new/libf2c/Makefile.in Mon Jun 14 16:16:07 1999
@@ -67,7 +67,12 @@
AR='$(AR)' \
RANLIB='$(RANLIB)' \
PICFLAG='$(PICFLAG)' \
- RUNTESTFLAGS='$(RUNTESTFLAGS)'
+ RUNTESTFLAGS='$(RUNTESTFLAGS)' \
+ prefix='$(prefix)' \
+ exec_prefix='$(exec_prefix)' \
+ libdir='$(libdir)' \
+ libsubdir='$(libsubdir)' \
+ tooldir='$(tooldir)'
LIBG2C = libg2c.a
diff -ur orig/libiberty/Makefile.in new/libiberty/Makefile.in
--- orig/libiberty/Makefile.in Mon Jun 14 14:59:51 1999
+++ new/libiberty/Makefile.in Mon Jun 14 16:16:07 1999
@@ -85,7 +85,12 @@
"LDFLAGS=$(LDFLAGS)" \
"LOADLIBES=$(LOADLIBES)" \
"RANLIB=$(RANLIB)" \
- "SHELL=$(SHELL)"
+ "SHELL=$(SHELL)" \
+ "prefix=$(prefix)" \
+ "exec_prefix=$(exec_prefix)" \
+ "libdir=$(libdir)" \
+ "libsubdir=$(libsubdir)" \
+ "tooldir=$(tooldir)"
all: stamp-picdir $(TARGETLIB) needed-list required-list all-subdir
@$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=all
diff -ur orig/libobjc/Makefile.in new/libobjc/Makefile.in
--- orig/libobjc/Makefile.in Mon Jun 14 14:59:51 1999
+++ new/libobjc/Makefile.in Mon Jun 14 16:16:07 1999
@@ -102,7 +102,12 @@
"LOADLIBES=$(LOADLIBES)" \
"PICFLAG=$(PICFLAG)" \
"RANLIB=$(RANLIB)" \
- "SHELL=$(SHELL)"
+ "SHELL=$(SHELL)" \
+ "prefix=$(prefix)" \
+ "exec_prefix=$(exec_prefix)" \
+ "libdir=$(libdir)" \
+ "libsubdir=$(libsubdir)" \
+ "tooldir=$(tooldir)"
all: libobjc.a @OBJC_BOEHM_GC@
$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=all