Discussion:
[Bug build/12903] New: Makefile install target for libibert assumes gcc
tim.mooney at ndsu dot edu
2011-06-16 20:12:14 UTC
Permalink
http://sourceware.org/bugzilla/show_bug.cgi?id=12903

Summary: Makefile install target for libibert assumes gcc
Product: gdb
Version: 7.2
Status: NEW
Severity: normal
Priority: P2
Component: build
AssignedTo: ***@sourceware.org
ReportedBy: ***@ndsu.edu


I'm building gdb-7.2 on x86_64-sun-solaris2.10 (Solaris 10u6, not OpenSolaris)
with the Sun Workshop 12 u1 compiler toolchain.

The Makefile.in for libiberty just assumes that gcc is going to be used to
build everything, as it hardcodes ``-print-multi-os-directory'' into the
install flags for libiberty. This obviously doesn't work for Sun's "cc":

gmake[2]: Entering directory `/local/src/RPM/BUILD/gdb-7.2/libiberty'
gmake[3]: Entering directory `/local/src/RPM/BUILD/gdb-7.2/libiberty/testsuite'
gmake[3]: Nothing to be done for `all'.
gmake[3]: Leaving directory `/local/src/RPM/BUILD/gdb-7.2/libiberty/testsuite'
/bin/bash ./../mkinstalldirs /tmp/build/gdb/local/gnu/lib/64/`cc -Xa -xs -g
-xta
rget=native -m64 -xarch=native -I/local/gnu/include -I/local/gnu/include
-I/loca
l/include -print-multi-os-directory`
cc: Warning: Option -nt-multi-os-directory passed to ld, if ld is invoked,
ignor
ed otherwise
usage: cc [ options] files. Use 'cc -flags' for details
/local/gnu/bin/ginstall -c -m 644 ./libiberty.a
/tmp/build/gdb/local/gnu/lib/64/
`cc -Xa -xs -g -xtarget=native -m64 -xarch=native -I/local/gnu/include
-I/local/
gnu/include -I/local/include -print-multi-os-directory`/./libiberty.an
cc: Warning: Option -nt-multi-os-directory passed to ld, if ld is invoked,
ignor
ed otherwise
usage: cc [ options] files. Use 'cc -flags' for details
( cd /tmp/build/gdb/local/gnu/lib/64/`cc -Xa -xs -g -xtarget=native -m64
-xarch=
native -I/local/gnu/include -I/local/gnu/include -I/local/include
-print-multi-o
s-directory` ; chmod 644 ./libiberty.an ;ranlib ./libiberty.an )
cc: Warning: Option -nt-multi-os-directory passed to ld, if ld is invoked,
ignor
ed otherwise
usage: cc [ options] files. Use 'cc -flags' for details
mv -f /tmp/build/gdb/local/gnu/lib/64/`cc -Xa -xs -g -xtarget=native -m64
-xarch
=native -I/local/gnu/include -I/local/gnu/include -I/local/include
-print-multi-
os-directory`/./libiberty.an /tmp/build/gdb/local/gnu/lib/64/`cc -Xa -xs -g
-xta
rget=native -m64 -xarch=native -I/local/gnu/include -I/local/gnu/include
-I/loca
l/include -print-multi-os-directory`/./libiberty.a
cc: Warning: Option -nt-multi-os-directory passed to ld, if ld is invoked,
ignor
ed otherwise
usage: cc [ options] files. Use 'cc -flags' for details
cc: Warning: Option -nt-multi-os-directory passed to ld, if ld is invoked,
ignor
ed otherwise
usage: cc [ options] files. Use 'cc -flags' for details


This was not a problem in gdb-7.0.1. I never tried gdb-7.1, so I don't know if
the problem was present there or not.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
pedro at codesourcery dot com
2011-06-17 09:12:07 UTC
Permalink
http://sourceware.org/bugzilla/show_bug.cgi?id=12903

Pedro Alves <pedro at codesourcery dot com> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |pedro at codesourcery dot
| |com

--- Comment #1 from Pedro Alves <pedro at codesourcery dot com> 2011-06-17 09:11:35 UTC ---
Diffing 7.0's and 7.2's Makefile.in.

--- /home/pedro/gdb/7_0/src/libiberty/Makefile.in 2011-01-13
10:31:59.628963997 +0000
+++ /home/pedro/gdb/7_2/src/libiberty/Makefile.in 2011-01-13
10:44:23.278964001 +0000
@@ -101,7 +101,7 @@ SUBDIRS = testsuite

# FIXME: add @BUILD_INFO@ once we're sure it works for everyone.
all: stamp-picdir $(TARGETLIB) required-list all-subdir
- @: $(MAKE) ; exec $(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=all
+ @: $(MAKE) ; $(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=all

.PHONY: check installcheck
check: check-subdir
@@ -371,10 +371,12 @@ TAGS: $(CFILES)
etags `for i in $(CFILES); do echo $(srcdir)/$$i ; done`

# The standalone demangler (c++filt) has been moved to binutils.
-demangle:
+# But make this target work anyway for demangler hacking.
+demangle: $(ALL) $(srcdir)/cp-demangle.c
@echo "The standalone demangler, now named c++filt, is now"
@echo "a part of binutils."
- @false
+ $(CC) @DEFS@ $(CFLAGS) $(CPPFLAGS) -I. -I$(INCDIR) $(HDEFINES) \
+ $(srcdir)/cp-demangle.c -DSTANDALONE_DEMANGLER $(TARGETLIB) -o $@

ls:
@echo Makefile $(CFILES)
@@ -722,7 +724,7 @@ $(CONFIGURED_OFILES): stamp-picdir

./lbasename.o: $(srcdir)/lbasename.c config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
- $(INCDIR)/safe-ctype.h
+ $(INCDIR)/safe-ctype.h $(INCDIR)/filenames.h
if [ x"$(PICFLAG)" != x ]; then \
$(COMPILE.c) $(PICFLAG) $(srcdir)/lbasename.c -o pic/$@; \
else true; fi

There doesn't seem to be any relevant difference.

The last mention of -print-multi-os-directory in the ChangeLog is:

2003-01-27 Alexandre Oliva <***@redhat.com>

* Makefile.in (install_to_tooldir): Instead of $(MULTISUBDIR), use
/`$$CC -print-multi-os-directory`.

Which is much earlier than 7.0.

I'm a bit puzzled how this isn't visible with 7.0.

Note that libiberty is "owned" by gcc.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
tromey at sourceware dot org
2018-09-26 11:51:09 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=12903

Tom Tromey <tromey at sourceware dot org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |WAITING
CC| |tromey at sourceware dot org

--- Comment #2 from Tom Tromey <tromey at sourceware dot org> ---
Is this still an issue?
--
You are receiving this mail because:
You are on the CC list for the bug.
tim.mooney at ndsu dot edu
2018-09-26 18:10:28 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=12903

--- Comment #3 from tim.mooney at ndsu dot edu ---
My bug report originated 7 years ago. I no longer have access to Solaris 10.
I do still use one of the descendants of OpenSolaris, but even that descendant
(OpenIndiana) has diverged enough from Oracle Solaris that recent versions of
the Oracle Studio compiler no longer really work.

My recommendation is that you close this report.
--
You are receiving this mail because:
You are on the CC list for the bug.
tromey at sourceware dot org
2018-09-26 18:16:13 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=12903

Tom Tromey <tromey at sourceware dot org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution|--- |FIXED

--- Comment #4 from Tom Tromey <tromey at sourceware dot org> ---
Ok, thank you.
--
You are receiving this mail because:
You are on the CC list for the bug.
Loading...