LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Greentime Hu <green.hu@gmail.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Arnd Bergmann <arnd@arndb.de>,
	Greentime <greentime@andestech.com>,
	Guenter Roeck <private@roeck-us.net>
Subject: Re: [9/9] nds32: Fix the allmodconfig build. To make sure CONFIG_CPU_LITTLE_ENDIAN is default y
Date: Fri, 20 Apr 2018 19:54:51 +0800	[thread overview]
Message-ID: <CAEbi=3dpFsm-gSZbTngcdT9kMr1aPPoXgUmuqvDFWaKUFgXVfw@mail.gmail.com> (raw)
In-Reply-To: <20180419183840.GA500@roeck-us.net>

2018-04-20 2:38 GMT+08:00 Guenter Roeck <linux@roeck-us.net>:
> On Thu, Apr 19, 2018 at 09:18:15PM +0800, Greentime Hu wrote:
>> This way we can build kernel with CONFIG_CPU_LITTLE_ENDIAN=y and allmodconfig
>> will be available.
>>
>> Signed-off-by: Greentime Hu <greentime@andestech.com>
>
> As Arnd suspected, this causes allnoconfig to fail.
> The failure is due to endianness mismatches in vdso code.
>
> Not sure if that is really an improvement.
>

Thank you for reviewing.
The reason of this issue is because some objects are compiled with -EL
and some objects are compiled with -EB to cause endianness mismatch
issue.
It happened because AFLAGS and LDFLAGS is not passed correctly. I will
send the 2nd verson patch to fix this issue.

Yes, allnoconfig is fine after applying these fixes.

diff --git a/arch/nds32/Makefile b/arch/nds32/Makefile
index 20edf34e70ce..513bb2e9baf9 100644
--- a/arch/nds32/Makefile
+++ b/arch/nds32/Makefile
@@ -32,8 +32,12 @@ endif

 ifdef CONFIG_CPU_LITTLE_ENDIAN
 KBUILD_CFLAGS   += $(call cc-option, -EL)
+KBUILD_AFLAGS   += $(call cc-option, -EL)
+LDFLAGS         += $(call cc-option, -EL)
 else
 KBUILD_CFLAGS   += $(call cc-option, -EB)
+KBUILD_AFLAGS   += $(call cc-option, -EB)
+LDFLAGS         += $(call cc-option, -EB)
 endif

---
greentime@atcsqa02:/sqa2/greentime/contrib/travis/build_script/src_pkg/linux
<gt-master> $ nds32le-elf-readelf -h vmlinux
ELF Header:
  Magic:   7f 45 4c 46 01 02 01 00 00 00 00 00 00 00 00 00
  Class:                             ELF32
  Data:                              2's complement, big endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              EXEC (Executable file)
  Machine:                           Andes Technology compact code
size embedded RISC processor family
  Version:                           0x1
  Entry point address:               0xc000
  Start of program headers:          52 (bytes into file)
  Start of section headers:          905772 (bytes into file)
  Flags:                             0x30000242, AABI, Andes ELF V1.4,
Andes Star v3.0, PERF1
  Size of this header:               52 (bytes)
  Size of program headers:           32 (bytes)
  Number of program headers:         4
  Size of section headers:           40 (bytes)
  Number of section headers:         18
  Section header string table index: 15

  reply	other threads:[~2018-04-20 11:55 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-19 13:18 [PATCH 1/9] nds32: lib: To use generic lib instead of libgcc to prevent the symbol undefined issue Greentime Hu
2018-04-19 13:18 ` [PATCH 2/9] nds32: Fix building error when CONFIG_FREEZE is enabled Greentime Hu
2018-04-19 13:18 ` [PATCH 3/9] nds32: Fix building error of crypto/xor.c by adding xor.h Greentime Hu
2018-04-19 13:18 ` [PATCH 4/9] nds32: Fix drivers/gpu/drm/udl/udl_fb.c building error by defining PAGE_SHARED Greentime Hu
2018-04-19 13:18 ` [PATCH 5/9] nds32: Fix xfs_buf built failed by export invalidate_kernel_vmap_range and flush_kernel_vmap_range Greentime Hu
2018-04-19 13:18 ` [PATCH 6/9] nds32: Fix the symbols undefined issue by exporting them Greentime Hu
2018-04-20 10:41   ` Christoph Hellwig
2018-04-20 12:01     ` Greentime Hu
2018-04-19 13:18 ` [PATCH 7/9] nds32: Fix the unknown type u8 issue Greentime Hu
2018-04-19 13:18 ` [PATCH 8/9] nds32: Fix build failed because arch_trace_hardirqs_off is changed to trace_hardirqs_off Greentime Hu
2018-04-19 13:18 ` [PATCH 9/9] nds32: Fix the allmodconfig build. To make sure CONFIG_CPU_LITTLE_ENDIAN is default y Greentime Hu
2018-04-19 13:35   ` Arnd Bergmann
2018-04-19 18:38   ` [9/9] " Guenter Roeck
2018-04-20 11:54     ` Greentime Hu [this message]
2018-04-19 13:36 ` [PATCH 1/9] nds32: lib: To use generic lib instead of libgcc to prevent the symbol undefined issue Arnd Bergmann

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='CAEbi=3dpFsm-gSZbTngcdT9kMr1aPPoXgUmuqvDFWaKUFgXVfw@mail.gmail.com' \
    --to=green.hu@gmail.com \
    --cc=arnd@arndb.de \
    --cc=greentime@andestech.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=private@roeck-us.net \
    --subject='Re: [9/9] nds32: Fix the allmodconfig build. To make sure CONFIG_CPU_LITTLE_ENDIAN is default y' \
    /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

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 NNTP newsgroup(s).