mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nicholas Piggin <npiggin@gmail.com>
To: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Guenter Roeck <linux@roeck-us.net>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: Build failure in -next due to 'sh: thin archives fix linking'
Date: Fri, 30 Jun 2017 02:58:26 +1000	[thread overview]
Message-ID: <20170630025826.494397c4@roar.ozlabs.ibm.com> (raw)
In-Reply-To: <CAK7LNAQ5rY+5Fv_bvr2cqg2Se1k_abAH1qkAUECdjEhE=4H=5g@mail.gmail.com>

On Fri, 30 Jun 2017 00:36:42 +0900
Masahiro Yamada <yamada.masahiro@socionext.com> wrote:

> Hi.
> 
> 2017-06-28 23:02 GMT+09:00 Guenter Roeck <linux@roeck-us.net>:
> > On 06/28/2017 05:58 AM, Nicholas Piggin wrote:  
> >>
> >> On Wed, 28 Jun 2017 05:38:50 -0700
> >> Guenter Roeck <linux@roeck-us.net> wrote:
> >>  
> >>> Hi,
> >>>
> >>> I see the following build error in -next when building
> >>> sh:rts7751r2dplus_defconfig.
> >>>
> >>> sh4-linux-ld: arch/sh/kernel/vsyscall/vsyscall-dummy.o: compiled for a
> >>> big endian system and target is little endian
> >>> sh4-linux-ld: arch/sh/kernel/vsyscall/vsyscall-dummy.o: uses instructions
> >>> which are incompatible with instructions used in previous modules
> >>> sh4-linux-ld: failed to merge target specific data of file
> >>> arch/sh/kernel/vsyscall/vsyscall-dummy.o
> >>> make[2]: *** [arch/sh/kernel/vsyscall/vsyscall-syms.o] Error 1
> >>>
> >>> Bisect points to 'sh: thin archives fix linking' as the culprit. Bisect
> >>> log is attached.
> >>> I tried with gcc 4.8.3 and 6.3.0, both built with buildroot for sh4eb.  
> >>
> >>
> >> Thanks for the report. In arch/sh/kernel/vsyscall/Makefile, the line:
> >>
> >>   cmd_syscall_syms = $(LD) -r -o $@ -R $<
> >>
> >> Can you try adding $(LDFLAGS), e.g. change it to:
> >>
> >>   cmd_syscall_syms = $(LD) $(LDFLAGS) -r -o $@ -R $<
> >>  
> >
> > That fixes the problem (including the missing symbols seen after reverting
> > the offending patch).  
> 
> 
> Thanks!
> 
> Instead of adding $(LDFLAGS), how about using cmd_ld?
> 
> 
> Please see line 260 of scripts/Makefile.lib
> 
> quiet_cmd_ld = LD      $@
> cmd_ld = $(LD) $(LDFLAGS) $(ldflags-y) $(LDFLAGS_$(@F)) \
>                $(filter-out FORCE,$^) -o $@
> 
> We can reuse it and $(LDFLAGS) is already there.
> 
> 
> 
> I also noticed redundant "targets += gate-syms.o"
> I see "obj-y += gate-syms.o" and $(obj-y) is automatically
> added to "targets".
> 
> 
> The following diff is my proposal.
> If it is OK, I will squash it and update the thin-ar branch.

Yes, I think this is much better. Thank you! Please squash it in.

Thanks,
Nick

      reply	other threads:[~2017-06-29 16:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-28 12:38 Guenter Roeck
2017-06-28 12:58 ` Nicholas Piggin
2017-06-28 14:02   ` Guenter Roeck
2017-06-29 15:36     ` Masahiro Yamada
2017-06-29 16:58       ` Nicholas Piggin [this message]

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=20170630025826.494397c4@roar.ozlabs.ibm.com \
    --to=npiggin@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=yamada.masahiro@socionext.com \
    /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

all inboxes | Powered by JetHome®