public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/49908] New: -lm missing after -lmpc
@ 2011-07-29 21:55 marc.glisse at normalesup dot org
  2011-07-29 21:59 ` [Bug bootstrap/49908] " pinskia at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: marc.glisse at normalesup dot org @ 2011-07-29 21:55 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49908

           Summary: -lm missing after -lmpc
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: marc.glisse@normalesup.org
              Host: i386-pc-solaris2.11


Hello,

I am using a not-gcc (sunpro) compiler to initiate a bootstrap. I let gcc build
gmp/mpfr/mpc. When linking cc1 in stage1, I see:

cc   -g -DIN_GCC    -DHAVE_CONFIG_H  -o cc1 c-lang.o c-family/stub-objc.o
attribs.o c-errors.o c-decl.o c-typeck.o c-convert.o c-aux-info.o
c-objc-common.o c-parser.o tree-mudflap.o c-family/c-common.o
c-family/c-cppbuiltin.o c-family/c-dump.o c-family/c-format.o
c-family/c-gimplify.o c-family/c-lex.o c-family/c-omp.o c-family/c-opts.o
c-family/c-pch.o c-family/c-ppoutput.o c-family/c-pragma.o
c-family/c-pretty-print.o c-family/c-semantics.o c-family/c-ada-spec.o i386-c.o
sol2-c.o default-c.o \
          cc1-checksum.o main.o tree-browser.o libbackend.a libcommon-target.a
libcommon.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a libcommon.a
../libcpp/libcpp.a   ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a   
-L/home/oracle/build/./gmp/.libs -L/home/oracle/build/./mpfr/.libs
-L/home/oracle/build/./mpc/src/.libs -lmpc -lmpfr -lgmp   -L../zlib -lz
Undefined                       first referenced
 symbol                             in file
cimag                              
/home/oracle/build/./mpc/src/.libs/libmpc.a(set_x.o)
creal                              
/home/oracle/build/./mpc/src/.libs/libmpc.a(set_x.o)
cimagl                             
/home/oracle/build/./mpc/src/.libs/libmpc.a(set_x.o)
creall                             
/home/oracle/build/./mpc/src/.libs/libmpc.a(set_x.o)
ld: fatal: symbol referencing errors. No output written to cc1

The missing symbols are all available in libm, as specified in libmpc.la.

(solaris comes with an older gcc-3.4 but mpc doesn't build with it, hence my
use of suncc)


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug bootstrap/49908] -lm missing after -lmpc
  2011-07-29 21:55 [Bug bootstrap/49908] New: -lm missing after -lmpc marc.glisse at normalesup dot org
@ 2011-07-29 21:59 ` pinskia at gcc dot gnu.org
  2011-07-29 22:09 ` marc.glisse at normalesup dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2011-07-29 21:59 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49908

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-07-29 21:59:32 UTC ---
Normally most compilers inline cimag and creal.  Seems weird that Sun's
compiler does not.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug bootstrap/49908] -lm missing after -lmpc
  2011-07-29 21:55 [Bug bootstrap/49908] New: -lm missing after -lmpc marc.glisse at normalesup dot org
  2011-07-29 21:59 ` [Bug bootstrap/49908] " pinskia at gcc dot gnu.org
@ 2011-07-29 22:09 ` marc.glisse at normalesup dot org
  2011-07-29 22:19 ` marc.glisse at normalesup dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: marc.glisse at normalesup dot org @ 2011-07-29 22:09 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49908

--- Comment #2 from Marc Glisse <marc.glisse at normalesup dot org> 2011-07-29 22:09:21 UTC ---
(In reply to comment #1)
> Normally most compilers inline cimag and creal.  Seems weird that Sun's
> compiler does not.

It does on a trivial testcase. I'll try to see why it doesn't in mpc.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug bootstrap/49908] -lm missing after -lmpc
  2011-07-29 21:55 [Bug bootstrap/49908] New: -lm missing after -lmpc marc.glisse at normalesup dot org
  2011-07-29 21:59 ` [Bug bootstrap/49908] " pinskia at gcc dot gnu.org
  2011-07-29 22:09 ` marc.glisse at normalesup dot org
@ 2011-07-29 22:19 ` marc.glisse at normalesup dot org
  2021-07-19  6:00 ` pinskia at gcc dot gnu.org
  2021-07-19  6:17 ` glisse at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: marc.glisse at normalesup dot org @ 2011-07-29 22:19 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49908

--- Comment #3 from Marc Glisse <marc.glisse at normalesup dot org> 2011-07-29 22:18:52 UTC ---
(In reply to comment #2)
> > Normally most compilers inline cimag and creal.  Seems weird that Sun's
> > compiler does not.
> It does on a trivial testcase. I'll try to see why it doesn't in mpc.

Er, forget that, different PATH in this terminal :-(
Even with -fast (which implies -xbuiltin=%all), oracle solaris studio 12.3
never inlines cimag...


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug bootstrap/49908] -lm missing after -lmpc
  2011-07-29 21:55 [Bug bootstrap/49908] New: -lm missing after -lmpc marc.glisse at normalesup dot org
                   ` (2 preceding siblings ...)
  2011-07-29 22:19 ` marc.glisse at normalesup dot org
@ 2021-07-19  6:00 ` pinskia at gcc dot gnu.org
  2021-07-19  6:17 ` glisse at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-07-19  6:00 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|UNCONFIRMED                 |RESOLVED
   Target Milestone|---                         |7.0

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
GCC builds now with the c++ which means this won't show up.  So closing as
fixed.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug bootstrap/49908] -lm missing after -lmpc
  2011-07-29 21:55 [Bug bootstrap/49908] New: -lm missing after -lmpc marc.glisse at normalesup dot org
                   ` (3 preceding siblings ...)
  2021-07-19  6:00 ` pinskia at gcc dot gnu.org
@ 2021-07-19  6:17 ` glisse at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: glisse at gcc dot gnu.org @ 2021-07-19  6:17 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Marc Glisse <glisse at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #4)
> GCC builds now with the c++ which means this won't show up.

Just because g++ has an implicit -lm doesn't mean that any random 3rd-party C++
compiler does too.
(I don't really care about this PR though, I don't mind it being closed)

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-07-19  6:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-29 21:55 [Bug bootstrap/49908] New: -lm missing after -lmpc marc.glisse at normalesup dot org
2011-07-29 21:59 ` [Bug bootstrap/49908] " pinskia at gcc dot gnu.org
2011-07-29 22:09 ` marc.glisse at normalesup dot org
2011-07-29 22:19 ` marc.glisse at normalesup dot org
2021-07-19  6:00 ` pinskia at gcc dot gnu.org
2021-07-19  6:17 ` glisse at gcc dot gnu.org

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).