public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: Jakub Jelinek <jakub@redhat.com>, Paolo Bonzini <bonzini@gnu.org>,
	DJ Delorie <dj@redhat.com>,
		neroden@gcc.gnu.org, Alexandre Oliva <aoliva@redhat.com>,
		Ralf Wildenhues <Ralf.Wildenhues@gmx.de>,
	gcc-patches@gcc.gnu.org
Subject: Re: Use libstdc++-raw-cxx.m4 in libjava
Date: Fri, 04 Jan 2013 14:56:00 -0000	[thread overview]
Message-ID: <CAMe9rOppWpyWrBqV3h6+YONoq_3W=S_P3bVhPq9E0riQ9b0b2g@mail.gmail.com> (raw)
In-Reply-To: <m2hamxntyh.fsf@igel.home>

On Fri, Jan 4, 2013 at 2:06 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
> "H.J. Lu" <hjl.tools@gmail.com> writes:
>
>> On Thu, Jan 3, 2013 at 10:09 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
>>> "H.J. Lu" <hjl.tools@gmail.com> writes:
>>>
>>>> diff --git a/libjava/Makefile.am b/libjava/Makefile.am
>>>> index c6c84e4..dd08a4f 100644
>>>> --- a/libjava/Makefile.am
>>>> +++ b/libjava/Makefile.am
>>>> @@ -594,7 +594,7 @@ lib_gnu_awt_xlib_la_CPPFLAGS = \
>>>>       $(AM_CPPFLAGS) \
>>>>       $(LIBSTDCXX_RAW_CXX_CXXFLAGS)
>>>>  ## The mysterious backslash in the grep pattern is consumed by make.
>>>> -lib_gnu_awt_xlib_la_LDFLAGS = $(LIBSTDCXX_RAW_CXX_LDLAGS) \
>>>> +lib_gnu_awt_xlib_la_LDFLAGS = $(LIBSTDCXX_RAW_CXX_LIBADD) \
>>>>       @X_PRE_LIBS@ @X_LIBS@ -lX11 @X_EXTRA_LIBS@ \
>>>>          -rpath $(toolexeclibdir) $(LIBJAVA_LDFLAGS_NOUNDEF) \
>>>>          -version-info `grep -v '^\#' $(srcdir)/libtool-version`
>>>> $(LIBGCJ_LD_SYMBOLIC)
>>>
>>> It is still wrong to use LDFLAGS for libraries to be linked in.
>>> All of $(LIBSTDCXX_RAW_CXX_LIBADD) @X_PRE_LIBS@ @X_LIBS@ -lX11
>>> @X_EXTRA_LIBS@ should be on lib_gnu_awt_xlib_la_LDADD.
>>>
>>
>> This was how it was done before my change.  If we want to
>> make a change, I can submit a separate patch.
>
> Libraries should never occur before the objects which reference them.
>

This is in GCC 4.7:

lib_gnu_awt_xlib_la_LDFLAGS = ../libstdc++-v3/src/libstdc++.la \
        @X_PRE_LIBS@ @X_LIBS@ -lX11 @X_EXTRA_LIBS@ \
        -rpath $(toolexeclibdir) $(LIBJAVA_LDFLAGS_NOUNDEF) \
        -version-info `grep -v '^\#' $(srcdir)/libtool-version`
$(LIBGCJ_LD_SYMBOLIC)
lib_gnu_awt_xlib_la_LINK = $(LIBLINK) $(lib_gnu_awt_xlib_la_LDFLAGS) \
        $(lib_gnu_awt_xlib_la_version_arg)

It does put libraries first.  If it is a real bug, it should be fixed
separately.

-- 
H.J.

  reply	other threads:[~2013-01-04 14:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-11 22:00 H.J. Lu
2012-12-12  8:50 ` Paolo Bonzini
2013-01-02 11:11 ` Jakub Jelinek
2013-01-02 11:27   ` Andreas Schwab
2013-01-03 17:18     ` H.J. Lu
2013-01-03 18:09       ` Andreas Schwab
2013-01-03 18:47         ` H.J. Lu
2013-01-04 10:06           ` Andreas Schwab
2013-01-04 14:56             ` H.J. Lu [this message]
2013-01-07 17:49               ` H.J. Lu

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='CAMe9rOppWpyWrBqV3h6+YONoq_3W=S_P3bVhPq9E0riQ9b0b2g@mail.gmail.com' \
    --to=hjl.tools@gmail.com \
    --cc=Ralf.Wildenhues@gmx.de \
    --cc=aoliva@redhat.com \
    --cc=bonzini@gnu.org \
    --cc=dj@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=neroden@gcc.gnu.org \
    --cc=schwab@linux-m68k.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).