All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [BUG] qemu-x86_defconfig does not build with GCC 8.1
@ 2018-07-28 15:42 Heinrich Schuchardt
  2018-07-29  0:40 ` Bin Meng
  0 siblings, 1 reply; 7+ messages in thread
From: Heinrich Schuchardt @ 2018-07-28 15:42 UTC (permalink / raw)
  To: u-boot

Debian Buster has upgraded gcc to version 8.1.

With gcc 8.1 I get an error when trying to build qemu-x86_defconfig

{standard input}: Assembler messages:
{standard input}:7465: Error: junk at end of line, first unrecognized
character is `@'

The problematic line in the generated assembler code is

.long   end.6133 at gotoff-start.6130@gotoff

This difference relates to the length of a linker generated list and is
only needed for debugging. It is not generated when compiling without
option -g.

Compilation on x86 works fine with gcc 7.3.
gcc 7.3 simply does not generate the line at all.

To generate the complete assembler code use gcc with options
-S -fverbose-asm.

Best regards

Heinrich


gcc -Wp,-MD,common/.command.o.d  -nostdinc -isystem
/usr/lib/gcc/x86_64-linux-gnu/8/include -Iinclude   -I./arch/x86/include
-include ./include/linux/kconfig.h -D__KERNEL__ -D__UBOOT__ -Wall
-Wstrict-prototypes -Wno-format-security -fno-builtin -ffreestanding
-std=gnu11 -fshort-wchar -Os -fno-stack-protector
-fno-delete-null-pointer-checks -fmacro-prefix-map=./= -g -fstack-usage
-Wno-format-nonliteral -Werror=date-time -fno-strict-aliasing
-fomit-frame-pointer -fno-toplevel-reorder -fno-dwarf2-cfi-asm
-march=i386 -m32 -mregparm=3 -D__I386__ -ffunction-sections
-fvisibility=hidden -pipe    -D"KBUILD_STR(s)=#s"
-D"KBUILD_BASENAME=KBUILD_STR(command)"
-D"KBUILD_MODNAME=KBUILD_STR(command)" -c -o common/command.o
common/command.c
{standard input}: Assembler messages:
{standard input}:7465: Error: junk at end of line, first unrecognized
character is `@'
{standard input}:10573: Error: junk at end of line, first unrecognized
character is `@'
{standard input}:10587: Error: junk at end of line, first unrecognized
character is `@'
{standard input}:7465: Error: can't resolve `end.6133'
{.u_boot_list_2_cmd_3 section} - `start.6130' {.u_boot_list_2_cmd_1 section}
{standard input}:10573: Error: can't resolve `end.6164'
{.u_boot_list_2_cmd_3 section} - `start.6161' {.u_boot_list_2_cmd_1 section}
{standard input}:10587: Error: can't resolve `end.6164'
{.u_boot_list_2_cmd_3 section} - `start.6161' {.u_boot_list_2_cmd_1 section}

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

* [U-Boot] [BUG] qemu-x86_defconfig does not build with GCC 8.1
  2018-07-28 15:42 [U-Boot] [BUG] qemu-x86_defconfig does not build with GCC 8.1 Heinrich Schuchardt
@ 2018-07-29  0:40 ` Bin Meng
  2018-07-29 12:09   ` Heinrich Schuchardt
  0 siblings, 1 reply; 7+ messages in thread
From: Bin Meng @ 2018-07-29  0:40 UTC (permalink / raw)
  To: u-boot

Hi Heinrich,

On Sat, Jul 28, 2018 at 11:42 PM, Heinrich Schuchardt
<xypron.glpk@gmx.de> wrote:
> Debian Buster has upgraded gcc to version 8.1.

Do you know any pre-built gcc 8.1 that can be used on other
distributions than Debian Buster, so that I can take a look? I am
currently on Ubuntu 16.04.

>
> With gcc 8.1 I get an error when trying to build qemu-x86_defconfig
>
> {standard input}: Assembler messages:
> {standard input}:7465: Error: junk at end of line, first unrecognized
> character is `@'
>
> The problematic line in the generated assembler code is
>
> .long   end.6133 at gotoff-start.6130@gotoff
>
> This difference relates to the length of a linker generated list and is
> only needed for debugging. It is not generated when compiling without
> option -g.
>

Without '-g', does gcc 8.1 build?

> Compilation on x86 works fine with gcc 7.3.
> gcc 7.3 simply does not generate the line at all.
>

Does gcc 8.1 on Debin Buster come with multilib support? I vaguely
remember old version did not which would cause build error.

> To generate the complete assembler code use gcc with options
> -S -fverbose-asm.
>

Regards,
Bin

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

* [U-Boot] [BUG] qemu-x86_defconfig does not build with GCC 8.1
  2018-07-29  0:40 ` Bin Meng
@ 2018-07-29 12:09   ` Heinrich Schuchardt
  2018-08-06 15:13     ` Andy Shevchenko
  0 siblings, 1 reply; 7+ messages in thread
From: Heinrich Schuchardt @ 2018-07-29 12:09 UTC (permalink / raw)
  To: u-boot

On 07/29/2018 02:40 AM, Bin Meng wrote:
> Hi Heinrich,
> 
> On Sat, Jul 28, 2018 at 11:42 PM, Heinrich Schuchardt
> <xypron.glpk@gmx.de> wrote:
>> Debian Buster has upgraded gcc to version 8.1.
> 
> Do you know any pre-built gcc 8.1 that can be used on other
> distributions than Debian Buster, so that I can take a look? I am
> currently on Ubuntu 16.04.
> 

Ubuntu Cosmic has gcc 8.2. Setting up a virtual machine with
virt-manager is quite easy.

>>
>> With gcc 8.1 I get an error when trying to build qemu-x86_defconfig
>>
>> {standard input}: Assembler messages:
>> {standard input}:7465: Error: junk at end of line, first unrecognized
>> character is `@'
>>
>> The problematic line in the generated assembler code is
>>
>> .long   end.6133 at gotoff-start.6130@gotoff
>>
>> This difference relates to the length of a linker generated list and is
>> only needed for debugging. It is not generated when compiling without
>> option -g.
>>
> 
> Without '-g', does gcc 8.1 build?

Yes, if I remove the lines setting -g in /Makefile I have no build problem.

> 
>> Compilation on x86 works fine with gcc 7.3.
>> gcc 7.3 simply does not generate the line at all.
>>
> 
> Does gcc 8.1 on Debin Buster come with multilib support? I vaguely
> remember old version did not which would cause build error.
> 

There is also a gcc-multilib package with version 8.1 in Debian Buster.

Best regards

Heinrich

>> To generate the complete assembler code use gcc with options
>> -S -fverbose-asm.
>>
> 
> Regards,
> Bin
> 

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

* [U-Boot] [BUG] qemu-x86_defconfig does not build with GCC 8.1
  2018-07-29 12:09   ` Heinrich Schuchardt
@ 2018-08-06 15:13     ` Andy Shevchenko
  2018-08-06 16:36       ` Heinrich Schuchardt
  0 siblings, 1 reply; 7+ messages in thread
From: Andy Shevchenko @ 2018-08-06 15:13 UTC (permalink / raw)
  To: u-boot

On Sun, Jul 29, 2018 at 3:09 PM, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
> On 07/29/2018 02:40 AM, Bin Meng wrote:

> Ubuntu Cosmic has gcc 8.2. Setting up a virtual machine with
> virt-manager is quite easy.

Can you check if output of `gcc -v` has --enable-default-pie?
If so (I bet it is the case), can you try the following patch (sorry,
it's mangled, needs manual apply)

--- a/Makefile
+++ b/Makefile
@@ -371,6 +371,7 @@ KBUILD_CPPFLAGS := -D__KERNEL__ -D__UBOOT__

KBUILD_CFLAGS   := -Wall -Wstrict-prototypes \
                  -Wno-format-security \
+                  -fno-pie \
                  -fno-builtin -ffreestanding $(CSTD_FLAG)
KBUILD_CFLAGS  += -fshort-wchar
KBUILD_AFLAGS   := -D__ASSEMBLY__

P.S. I have no time right now to test this myself though.

-- 
With Best Regards,
Andy Shevchenko

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

* [U-Boot] [BUG] qemu-x86_defconfig does not build with GCC 8.1
  2018-08-06 15:13     ` Andy Shevchenko
@ 2018-08-06 16:36       ` Heinrich Schuchardt
  0 siblings, 0 replies; 7+ messages in thread
From: Heinrich Schuchardt @ 2018-08-06 16:36 UTC (permalink / raw)
  To: u-boot

On 08/06/2018 05:13 PM, Andy Shevchenko wrote:
> On Sun, Jul 29, 2018 at 3:09 PM, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>> On 07/29/2018 02:40 AM, Bin Meng wrote:
> 
>> Ubuntu Cosmic has gcc 8.2. Setting up a virtual machine with
>> virt-manager is quite easy.
> 
> Can you check if output of `gcc -v` has --enable-default-pie?

The flag is enabled both for gcc-7 and gcc-8 in Debian Buster.

> If so (I bet it is the case), can you try the following patch (sorry,
> it's mangled, needs manual apply)
> 
> --- a/Makefile
> +++ b/Makefile
> @@ -371,6 +371,7 @@ KBUILD_CPPFLAGS := -D__KERNEL__ -D__UBOOT__
> 
> KBUILD_CFLAGS   := -Wall -Wstrict-prototypes \
>                   -Wno-format-security \
> +                  -fno-pie \
>                   -fno-builtin -ffreestanding $(CSTD_FLAG)
> KBUILD_CFLAGS  += -fshort-wchar
> KBUILD_AFLAGS   := -D__ASSEMBLY__
> 
> P.S. I have no time right now to test this myself though.

With the flag building with gcc-8.1 works. But the interesting question
is whether the EFI subsystem will be able to relocate the runtime code
when the EFI sercice SetVirtualAddressMap is called.

Best regards

Heinrich

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

* [U-Boot] [BUG] qemu-x86_defconfig does not build with GCC 8.1
  2019-02-15 16:03 Ayush Dosaj
@ 2019-02-16 13:35 ` Ayush Dosaj
  0 siblings, 0 replies; 7+ messages in thread
From: Ayush Dosaj @ 2019-02-16 13:35 UTC (permalink / raw)
  To: u-boot

plz help

On Fri, Feb 15, 2019 at 9:33 PM Ayush Dosaj <ayushdosaj2313@gmail.com>
wrote:

> I have one question, where to remove "-g" and in which make file ?
> I am stuck on this BUG. Please Help me out.
> --
> Ayush Dosaj
> VIT Vellore
>
>

-- 
Ayush Dosaj
VIT Vellore

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

* [U-Boot] [BUG] qemu-x86_defconfig does not build with GCC 8.1
@ 2019-02-15 16:03 Ayush Dosaj
  2019-02-16 13:35 ` Ayush Dosaj
  0 siblings, 1 reply; 7+ messages in thread
From: Ayush Dosaj @ 2019-02-15 16:03 UTC (permalink / raw)
  To: u-boot

I have one question, where to remove "-g" and in which make file ?
I am stuck on this BUG. Please Help me out.
-- 
Ayush Dosaj
VIT Vellore

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

end of thread, other threads:[~2019-02-16 13:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-28 15:42 [U-Boot] [BUG] qemu-x86_defconfig does not build with GCC 8.1 Heinrich Schuchardt
2018-07-29  0:40 ` Bin Meng
2018-07-29 12:09   ` Heinrich Schuchardt
2018-08-06 15:13     ` Andy Shevchenko
2018-08-06 16:36       ` Heinrich Schuchardt
2019-02-15 16:03 Ayush Dosaj
2019-02-16 13:35 ` Ayush Dosaj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.