Hi,
since the "parisc: Add vDSO support" commit, I can no longer cross-build
a hppa kernel. I see two issues:
1) CROSS32_COMPILE detection doesn't work here, as openSUSE provides
hppa-suse-linux-* binaries. It's easy to overcome by
"CROSS32_COMPILE=hppa-suse-linux-"
2) openSUSE doesn't provide any libc for hppa. So gcc doesn't provide
libgcc.a and the build of vDSO fails.
So could vDSO be optional on hppa via KConfig?
I used to use the cross compiler to at least compile-check the following
tty drivers:
arch/parisc/kernel/pdc_cons.o
drivers/tty/serial/mux.o
drivers/tty/serial/8250/8250_gsc.o
thanks,
--
js
suse labs
Hi Jiri,
Thanks for testing on parisc!
On 3/8/22 12:06, Jiri Slaby wrote:
> since the "parisc: Add vDSO support" commit, I can no longer cross-build a hppa kernel. I see two issues:
>
> 1) CROSS32_COMPILE detection doesn't work here, as openSUSE provides hppa-suse-linux-* binaries. It's easy to overcome by "CROSS32_COMPILE=hppa-suse-linux-"
How is it handled for other platforms like s390x?
Would it make sense to add the detection for SUSE too?
> 2) openSUSE doesn't provide any libc for hppa. So gcc doesn't provide libgcc.a and the build of vDSO fails.
libgcc.a comes with the compiler, I don't think you need libc for that.
I'm currently installing opensuse to try myself though...
> So could vDSO be optional on hppa via KConfig?
The vDSO is one of the first things which is built during kernel build process.
This is why you fail.
Making it optional doesn't make sense, because then the kernel wouldn't be able
to start the user space processes.
> I used to use the cross compiler to at least compile-check the following tty drivers:
> arch/parisc/kernel/pdc_cons.o
> drivers/tty/serial/mux.o
> drivers/tty/serial/8250/8250_gsc.o
I assume you never built a full kernel, but stopped when building those modules?
Without libgcc.a the kernel itself wouldn't have linked before either.
Helge
* Helge Deller <[email protected]>:
> Hi Jiri,
>
> Thanks for testing on parisc!
>
> On 3/8/22 12:06, Jiri Slaby wrote:
> > since the "parisc: Add vDSO support" commit, I can no longer cross-build a hppa kernel. I see two issues:
> >
> > 1) CROSS32_COMPILE detection doesn't work here, as openSUSE provides hppa-suse-linux-* binaries. It's easy to overcome by "CROSS32_COMPILE=hppa-suse-linux-"
>
> How is it handled for other platforms like s390x?
> Would it make sense to add the detection for SUSE too?
>
> > 2) openSUSE doesn't provide any libc for hppa. So gcc doesn't provide libgcc.a and the build of vDSO fails.
>
> libgcc.a comes with the compiler, I don't think you need libc for that.
> I'm currently installing opensuse to try myself though...
>
> > So could vDSO be optional on hppa via KConfig?
> The vDSO is one of the first things which is built during kernel build process.
> This is why you fail.
> Making it optional doesn't make sense, because then the kernel wouldn't be able
> to start the user space processes.
>
> > I used to use the cross compiler to at least compile-check the following ?tty drivers:
> > arch/parisc/kernel/pdc_cons.o
> > drivers/tty/serial/mux.o
> > drivers/tty/serial/8250/8250_gsc.o
>
> I assume you never built a full kernel, but stopped when building those modules?
> Without libgcc.a the kernel itself wouldn't have linked before either.
Below is a hackish patch which should allow you to build at least until
those modules. The make will still fail when linking the vmlinux file,
because libgcc.a provides the necessary low level symbols.
I'm currently not planning to include this patch, because it simply
doesn't make sense. Maybe you could nevertheless try/use it?
I'm open to any other ideas you may have.
IMHO, the only solution is, that libgcc.a gets included into the suse cross
compiler rpm package.
Helge
diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile
index 2a9387a93592..3e62527db749 100644
--- a/arch/parisc/Makefile
+++ b/arch/parisc/Makefile
@@ -165,6 +165,7 @@ vmlinuz: bzImage
$(OBJCOPY) $(boot)/bzImage $@
ifeq ($(KBUILD_EXTMOD),)
+ifdef CONFIG_VDSO
# We need to generate vdso-offsets.h before compiling certain files in kernel/.
# In order to do that, we should use the archprepare target, but we can't since
# asm-offsets.h is included in some files used to generate vdso-offsets.h, and
@@ -177,6 +178,7 @@ vdso_prepare: prepare0
$(build)=arch/parisc/kernel/vdso64 include/generated/vdso64-offsets.h)
$(Q)$(MAKE) $(build)=arch/parisc/kernel/vdso32 include/generated/vdso32-offsets.h
endif
+endif
PHONY += vdso_install
diff --git a/arch/parisc/include/asm/vdso.h b/arch/parisc/include/asm/vdso.h
index ef8206193f82..d667cddd700d 100644
--- a/arch/parisc/include/asm/vdso.h
+++ b/arch/parisc/include/asm/vdso.h
@@ -2,6 +2,7 @@
#ifndef __PARISC_VDSO_H__
#define __PARISC_VDSO_H__
+#ifdef CONFIG_VDSO
#ifndef __ASSEMBLY__
#ifdef CONFIG_64BIT
@@ -15,6 +16,12 @@
extern struct vdso_data *vdso_data;
#endif /* __ASSEMBLY __ */
+#else /* CONFIG_VDSO */
+
+#define VDSO64_SYMBOL(tsk, name) (0)
+#define VDSO32_SYMBOL(tsk, name) (0)
+
+#endif /* CONFIG_VDSO */
/* Default link addresses for the vDSOs */
#define VDSO_LBASE 0
diff --git a/arch/parisc/kernel/Makefile b/arch/parisc/kernel/Makefile
index d579243edc2f..461dd4a85e99 100644
--- a/arch/parisc/kernel/Makefile
+++ b/arch/parisc/kernel/Makefile
@@ -41,6 +41,8 @@ obj-$(CONFIG_KEXEC_CORE) += kexec.o relocate_kernel.o
obj-$(CONFIG_KEXEC_FILE) += kexec_file.o
# vdso
+ifdef CONFIG_VDSO
obj-y += vdso.o
obj-$(CONFIG_64BIT) += vdso64/
obj-y += vdso32/
+endif
Hi,
On 08. 03. 22, 15:51, Helge Deller wrote:
> Hi Jiri,
>
> Thanks for testing on parisc!
>
> On 3/8/22 12:06, Jiri Slaby wrote:
>> since the "parisc: Add vDSO support" commit, I can no longer cross-build a hppa kernel. I see two issues:
>>
>> 1) CROSS32_COMPILE detection doesn't work here, as openSUSE provides hppa-suse-linux-* binaries. It's easy to overcome by "CROSS32_COMPILE=hppa-suse-linux-"
>
> How is it handled for other platforms like s390x?
s390 simply uses CC for vdso32:
cmd_vdso32cc = $(CC) $(c_flags) -c -o $@ $<
> Would it make sense to add the detection for SUSE too?
Maybe.
>> 2) openSUSE doesn't provide any libc for hppa. So gcc doesn't provide libgcc.a and the build of vDSO fails.
>
> libgcc.a comes with the compiler, I don't think you need libc for that.
I was told glibc is needed to build libgcc.a.
> I'm currently installing opensuse to try myself though...
>
>> So could vDSO be optional on hppa via KConfig?
> The vDSO is one of the first things which is built during kernel build process.
> This is why you fail.
> Making it optional doesn't make sense, because then the kernel wouldn't be able
> to start the user space processes.
>
>> I used to use the cross compiler to at least compile-check the following tty drivers:
>> arch/parisc/kernel/pdc_cons.o
>> drivers/tty/serial/mux.o
>> drivers/tty/serial/8250/8250_gsc.o
>
> I assume you never built a full kernel, but stopped when building those modules?
> Without libgcc.a the kernel itself wouldn't have linked before either.
Correct, I am only build-testing parisc-only drivers when doing global
tty changes.
thanks,
--
js
suse labs
Hello Jiri,
* Jiri Slaby <[email protected]>:
> On 09. 03. 22, 6:48, Jiri Slaby wrote:
> > On 08. 03. 22, 15:51, Helge Deller wrote:
> > > On 3/8/22 12:06, Jiri Slaby wrote:
> > > > since the "parisc: Add vDSO support" commit, I can no longer
> > > > cross-build a hppa kernel. I see two issues:
> > > >
> > > > 1) CROSS32_COMPILE detection doesn't work here, as openSUSE
> > > > provides hppa-suse-linux-* binaries. It's easy to overcome by
> > > > "CROSS32_COMPILE=hppa-suse-linux-"
> > >
> > ...
> > > Would it make sense to add the detection for SUSE too?
>
> So, could 1) be fixed on the Kconfig side? Or should I (people running SUSE)
> use "CROSS32_COMPILE=hppa-suse-linux-"?
Could you please try if this patch fixes it for you?
diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile
index 2a9387a93592..7583fc39ab2d 100644
--- a/arch/parisc/Makefile
+++ b/arch/parisc/Makefile
@@ -42,7 +42,7 @@ export LD_BFD
# Set default 32 bits cross compilers for vdso
CC_ARCHES_32 = hppa hppa2.0 hppa1.1
-CC_SUFFIXES = linux linux-gnu unknown-linux-gnu
+CC_SUFFIXES = linux linux-gnu unknown-linux-gnu suse-linux
CROSS32_COMPILE := $(call cc-cross-prefix, \
$(foreach a,$(CC_ARCHES_32), \
$(foreach s,$(CC_SUFFIXES),$(a)-$(s)-)))
@@ -52,7 +52,7 @@ export CROSS32CC
# Set default cross compiler for kernel build
ifdef cross_compiling
ifeq ($(CROSS_COMPILE),)
- CC_SUFFIXES = linux linux-gnu unknown-linux-gnu
+ CC_SUFFIXES = linux linux-gnu unknown-linux-gnu suse-linux
CROSS_COMPILE := $(call cc-cross-prefix, \
$(foreach a,$(CC_ARCHES), \
$(foreach s,$(CC_SUFFIXES),$(a)-$(s)-)))
>
> > > > 2) openSUSE doesn't provide any libc for hppa. So gcc doesn't
> > > > provide libgcc.a and the build of vDSO fails.
> > >
> > > libgcc.a comes with the compiler, I don't think you need libc for that.
> >
> > I was told glibc is needed to build libgcc.a.
>
> 2) was fixed on the compiler (SUSE) side. cross-hppa-gcc12-bootstrap was
> introduced -- note it's known to be a misnomer -- it should have been like
> s/-bootstrap/-baremetal/.
Great!
Helge
On 09. 03. 22, 6:48, Jiri Slaby wrote:
> Hi,
>
> On 08. 03. 22, 15:51, Helge Deller wrote:
>> Hi Jiri,
>>
>> Thanks for testing on parisc!
>>
>> On 3/8/22 12:06, Jiri Slaby wrote:
>>> since the "parisc: Add vDSO support" commit, I can no longer
>>> cross-build a hppa kernel. I see two issues:
>>>
>>> 1) CROSS32_COMPILE detection doesn't work here, as openSUSE provides
>>> hppa-suse-linux-* binaries. It's easy to overcome by
>>> "CROSS32_COMPILE=hppa-suse-linux-"
>>
>> How is it handled for other platforms like s390x?
>
> s390 simply uses CC for vdso32:
> cmd_vdso32cc = $(CC) $(c_flags) -c -o $@ $<
>
>> Would it make sense to add the detection for SUSE too?
>
> Maybe.
So, could 1) be fixed on the Kconfig side? Or should I (people running
SUSE) use "CROSS32_COMPILE=hppa-suse-linux-"?
>>> 2) openSUSE doesn't provide any libc for hppa. So gcc doesn't provide
>>> libgcc.a and the build of vDSO fails.
>>
>> libgcc.a comes with the compiler, I don't think you need libc for that.
>
> I was told glibc is needed to build libgcc.a.
2) was fixed on the compiler (SUSE) side. cross-hppa-gcc12-bootstrap was
introduced -- note it's known to be a misnomer -- it should have been
like s/-bootstrap/-baremetal/.
thanks,
--
js
suse labs
On 3/22/22 10:19, Jiri Slaby wrote:
> Hello,
>
> On 21. 03. 22, 19:51, Helge Deller wrote:
>> * Jiri Slaby <[email protected]>:
>>> On 09. 03. 22, 6:48, Jiri Slaby wrote:
>>>> On 08. 03. 22, 15:51, Helge Deller wrote:
>>>>> On 3/8/22 12:06, Jiri Slaby wrote:
>>>>>> since the "parisc: Add vDSO support" commit, I can no longer
>>>>>> cross-build a hppa kernel. I see two issues:
>>>>>>
>>>>>> 1) CROSS32_COMPILE detection doesn't work here, as openSUSE
>>>>>> provides hppa-suse-linux-* binaries. It's easy to overcome by
>>>>>> "CROSS32_COMPILE=hppa-suse-linux-"
>>>>>
>>>> ...
>>>>> Would it make sense to add the detection for SUSE too?
>>>
>>> So, could 1) be fixed on the Kconfig side? Or should I (people running SUSE)
>>> use "CROSS32_COMPILE=hppa-suse-linux-"?
>>
>> Could you please try if this patch fixes it for you?
>
> Works like a charm:
> $ make V=1 O=../a/arch/parisc/ ARCH=parisc -j6 drivers/tty/serial/mux.o
> ...
>> hppa-suse-linux-gcc <flags deleted> -o drivers/tty/serial/mux.o /home/latest/linux/drivers/tty/serial/mux.c
>> if hppa-suse-linux-objdump -h drivers/tty/serial/mux.o | ...; fi
>
> Thanks.
Great!
I've queued up a patch in for-next...
Helge
>
>> diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile
>> index 2a9387a93592..7583fc39ab2d 100644
>> --- a/arch/parisc/Makefile
>> +++ b/arch/parisc/Makefile
>> @@ -42,7 +42,7 @@ export LD_BFD
>>
>> # Set default 32 bits cross compilers for vdso
>> CC_ARCHES_32 = hppa hppa2.0 hppa1.1
>> -CC_SUFFIXES = linux linux-gnu unknown-linux-gnu
>> +CC_SUFFIXES = linux linux-gnu unknown-linux-gnu suse-linux
>> CROSS32_COMPILE := $(call cc-cross-prefix, \
>> $(foreach a,$(CC_ARCHES_32), \
>> $(foreach s,$(CC_SUFFIXES),$(a)-$(s)-)))
>> @@ -52,7 +52,7 @@ export CROSS32CC
>> # Set default cross compiler for kernel build
>> ifdef cross_compiling
>> ifeq ($(CROSS_COMPILE),)
>> - CC_SUFFIXES = linux linux-gnu unknown-linux-gnu
>> + CC_SUFFIXES = linux linux-gnu unknown-linux-gnu suse-linux
>> CROSS_COMPILE := $(call cc-cross-prefix, \
>> $(foreach a,$(CC_ARCHES), \
>> $(foreach s,$(CC_SUFFIXES),$(a)-$(s)-)))
>
Hello,
On 21. 03. 22, 19:51, Helge Deller wrote:
> * Jiri Slaby <[email protected]>:
>> On 09. 03. 22, 6:48, Jiri Slaby wrote:
>>> On 08. 03. 22, 15:51, Helge Deller wrote:
>>>> On 3/8/22 12:06, Jiri Slaby wrote:
>>>>> since the "parisc: Add vDSO support" commit, I can no longer
>>>>> cross-build a hppa kernel. I see two issues:
>>>>>
>>>>> 1) CROSS32_COMPILE detection doesn't work here, as openSUSE
>>>>> provides hppa-suse-linux-* binaries. It's easy to overcome by
>>>>> "CROSS32_COMPILE=hppa-suse-linux-"
>>>>
>>> ...
>>>> Would it make sense to add the detection for SUSE too?
>>
>> So, could 1) be fixed on the Kconfig side? Or should I (people running SUSE)
>> use "CROSS32_COMPILE=hppa-suse-linux-"?
>
> Could you please try if this patch fixes it for you?
Works like a charm:
$ make V=1 O=../a/arch/parisc/ ARCH=parisc -j6 drivers/tty/serial/mux.o
...
> hppa-suse-linux-gcc <flags deleted> -o drivers/tty/serial/mux.o
/home/latest/linux/drivers/tty/serial/mux.c
> if hppa-suse-linux-objdump -h drivers/tty/serial/mux.o | ...; fi
Thanks.
> diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile
> index 2a9387a93592..7583fc39ab2d 100644
> --- a/arch/parisc/Makefile
> +++ b/arch/parisc/Makefile
> @@ -42,7 +42,7 @@ export LD_BFD
>
> # Set default 32 bits cross compilers for vdso
> CC_ARCHES_32 = hppa hppa2.0 hppa1.1
> -CC_SUFFIXES = linux linux-gnu unknown-linux-gnu
> +CC_SUFFIXES = linux linux-gnu unknown-linux-gnu suse-linux
> CROSS32_COMPILE := $(call cc-cross-prefix, \
> $(foreach a,$(CC_ARCHES_32), \
> $(foreach s,$(CC_SUFFIXES),$(a)-$(s)-)))
> @@ -52,7 +52,7 @@ export CROSS32CC
> # Set default cross compiler for kernel build
> ifdef cross_compiling
> ifeq ($(CROSS_COMPILE),)
> - CC_SUFFIXES = linux linux-gnu unknown-linux-gnu
> + CC_SUFFIXES = linux linux-gnu unknown-linux-gnu suse-linux
> CROSS_COMPILE := $(call cc-cross-prefix, \
> $(foreach a,$(CC_ARCHES), \
> $(foreach s,$(CC_SUFFIXES),$(a)-$(s)-)))
--
--
js
suse labs
On Tue, Mar 22, 2022 at 10:42:33AM +0100, Helge Deller wrote:
> On 3/22/22 10:19, Jiri Slaby wrote:
> > Hello,
> >
> > On 21. 03. 22, 19:51, Helge Deller wrote:
> >> * Jiri Slaby <[email protected]>:
> >>> On 09. 03. 22, 6:48, Jiri Slaby wrote:
> >>>> On 08. 03. 22, 15:51, Helge Deller wrote:
> >>>>> On 3/8/22 12:06, Jiri Slaby wrote:
> >>>>>> since the "parisc: Add vDSO support" commit, I can no longer
> >>>>>> cross-build a hppa kernel. I see two issues:
> >>>>>>
> >>>>>> 1) CROSS32_COMPILE detection doesn't work here, as openSUSE
> >>>>>> provides hppa-suse-linux-* binaries. It's easy to overcome by
> >>>>>> "CROSS32_COMPILE=hppa-suse-linux-"
> >>>>>
> >>>> ...
> >>>>> Would it make sense to add the detection for SUSE too?
> >>>
> >>> So, could 1) be fixed on the Kconfig side? Or should I (people running SUSE)
> >>> use "CROSS32_COMPILE=hppa-suse-linux-"?
> >>
> >> Could you please try if this patch fixes it for you?
> >
> > Works like a charm:
> > $ make V=1 O=../a/arch/parisc/ ARCH=parisc -j6 drivers/tty/serial/mux.o
> > ...
> >>? hppa-suse-linux-gcc <flags deleted> -o drivers/tty/serial/mux.o /home/latest/linux/drivers/tty/serial/mux.c
> >>? if hppa-suse-linux-objdump -h drivers/tty/serial/mux.o | ...; fi
> >
> > Thanks.
>
> Great!
> I've queued up a patch in for-next...
>
Does that also fix the build problems now seen in mainline ?
Building parisc64:generic-64bit_defconfig ... failed
--------------
Error log:
arch/parisc/kernel/vdso64/Makefile:30: FORCE prerequisite is missing
arch/parisc/kernel/vdso32/sigtramp.S: Assembler messages:
arch/parisc/kernel/vdso32/sigtramp.S:39: Error: unknown pseudo-op: `.proc'
arch/parisc/kernel/vdso32/sigtramp.S:40: Error: unknown pseudo-op: `.callinfo'
arch/parisc/kernel/vdso32/sigtramp.S:41: Error: unknown pseudo-op: `.entry'
arch/parisc/kernel/vdso32/sigtramp.S:44: Error: no such instruction: `ldi 0,%r25'
arch/parisc/kernel/vdso32/sigtramp.S:45: Error: no such instruction: `ldi 173,%r20'
arch/parisc/kernel/vdso32/sigtramp.S:46: Error: no such instruction: `ble 0x100(%sr2,%r0)'
arch/parisc/kernel/vdso32/sigtramp.S:49: Error: no such instruction: `ldi 1,%r25'
arch/parisc/kernel/vdso32/sigtramp.S:50: Error: no such instruction: `ldi 173,%r20'
arch/parisc/kernel/vdso32/sigtramp.S:51: Error: no such instruction: `ble 0x100(%sr2,%r0)'
arch/parisc/kernel/vdso32/sigtramp.S:54: Error: unknown pseudo-op: `.exit'
arch/parisc/kernel/vdso32/sigtramp.S:55: Error: unknown pseudo-op: `.procend'
arch/parisc/kernel/vdso32/sigtramp.S:76: Error: unknown pseudo-op: `.stringz'
arch/parisc/kernel/vdso32/restart_syscall.S: Assembler messages:
arch/parisc/kernel/vdso32/restart_syscall.S:16: Error: bad or irreducible absolute expression
arch/parisc/kernel/vdso32/restart_syscall.S:16: Error: junk at end of line, first unrecognized character is `:'
arch/parisc/kernel/vdso32/restart_syscall.S:26: Error: no such instruction: `ldw 0(%sp),%r31'
arch/parisc/kernel/vdso32/restart_syscall.S:29: Error: no such instruction: `be 0x100(%sr2,%r0)'
arch/parisc/kernel/vdso32/restart_syscall.S:30: Error: no such instruction: `ldi 0,%r20'
arch/parisc/kernel/vdso32/restart_syscall.S:32: Error: .cfi_endproc without corresponding .cfi_startproc
make[2]: *** [arch/parisc/kernel/vdso32/Makefile:34: arch/parisc/kernel/vdso32/restart_syscall.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [arch/parisc/kernel/vdso32/Makefile:34: arch/parisc/kernel/vdso32/sigtramp.o] Error 1
make[1]: *** [arch/parisc/Makefile:177: vdso_prepare] Error 2
make: *** [Makefile:219: __sub-make] Error 2
This is with hppa64-linux-gcc (GCC) 11.2.0.
Thanks,
Guenter
On 3/22/22 14:05, Guenter Roeck wrote:
> Does that also fix the build problems now seen in mainline ?
No.
> Building parisc64:generic-64bit_defconfig ... failed
> --------------
> Error log:
> arch/parisc/kernel/vdso64/Makefile:30: FORCE prerequisite is missing
> arch/parisc/kernel/vdso32/sigtramp.S: Assembler messages:
> arch/parisc/kernel/vdso32/sigtramp.S:39: Error: unknown pseudo-op: `.proc'
> ...
> arch/parisc/kernel/vdso32/restart_syscall.S:32: Error: .cfi_endproc without corresponding .cfi_startproc
> make[2]: *** [arch/parisc/kernel/vdso32/Makefile:34: arch/parisc/kernel/vdso32/restart_syscall.o] Error 1
> make[2]: *** Waiting for unfinished jobs....
> make[2]: *** [arch/parisc/kernel/vdso32/Makefile:34: arch/parisc/kernel/vdso32/sigtramp.o] Error 1
> make[1]: *** [arch/parisc/Makefile:177: vdso_prepare] Error 2
> make: *** [Makefile:219: __sub-make] Error 2
>
> This is with hppa64-linux-gcc (GCC) 11.2.0.
Can you check if you have the 32-bit compiler (hppa-linux-gcc) installed too?
The errors above happen when building the 32-bit vDSO, for which you need the 32-bit compiler.
Helge
On 3/22/22 07:25, Helge Deller wrote:
> On 3/22/22 14:05, Guenter Roeck wrote:
>> Does that also fix the build problems now seen in mainline ?
>
> No.
>
>> Building parisc64:generic-64bit_defconfig ... failed
>> --------------
>> Error log:
>> arch/parisc/kernel/vdso64/Makefile:30: FORCE prerequisite is missing
>> arch/parisc/kernel/vdso32/sigtramp.S: Assembler messages:
>> arch/parisc/kernel/vdso32/sigtramp.S:39: Error: unknown pseudo-op: `.proc'
>> ...
>> arch/parisc/kernel/vdso32/restart_syscall.S:32: Error: .cfi_endproc without corresponding .cfi_startproc
>> make[2]: *** [arch/parisc/kernel/vdso32/Makefile:34: arch/parisc/kernel/vdso32/restart_syscall.o] Error 1
>> make[2]: *** Waiting for unfinished jobs....
>> make[2]: *** [arch/parisc/kernel/vdso32/Makefile:34: arch/parisc/kernel/vdso32/sigtramp.o] Error 1
>> make[1]: *** [arch/parisc/Makefile:177: vdso_prepare] Error 2
>> make: *** [Makefile:219: __sub-make] Error 2
>>
>> This is with hppa64-linux-gcc (GCC) 11.2.0.
>
> Can you check if you have the 32-bit compiler (hppa-linux-gcc) installed too?
> The errors above happen when building the 32-bit vDSO, for which you need the 32-bit compiler.
>
Yes, I do, but that doesn't help much if I want to build a 64-bit target such
as generic-64bit_defconfig. Am I missing something ?
Guenter
On 3/22/22 09:16, Helge Deller wrote:
> On 3/22/22 16:19, Guenter Roeck wrote:
>> On 3/22/22 07:25, Helge Deller wrote:
>>> On 3/22/22 14:05, Guenter Roeck wrote:
>>>> Does that also fix the build problems now seen in mainline ?
>>>
>>> No.
>>>
>>>> Building parisc64:generic-64bit_defconfig ... failed
>>>> --------------
>>>> Error log:
>>>> arch/parisc/kernel/vdso64/Makefile:30: FORCE prerequisite is missing
>>>> arch/parisc/kernel/vdso32/sigtramp.S: Assembler messages:
>>>> arch/parisc/kernel/vdso32/sigtramp.S:39: Error: unknown pseudo-op: `.proc'
>>>> ...
>>>> arch/parisc/kernel/vdso32/restart_syscall.S:32: Error: .cfi_endproc without corresponding .cfi_startproc
>>>> make[2]: *** [arch/parisc/kernel/vdso32/Makefile:34: arch/parisc/kernel/vdso32/restart_syscall.o] Error 1
>>>> make[2]: *** Waiting for unfinished jobs....
>>>> make[2]: *** [arch/parisc/kernel/vdso32/Makefile:34: arch/parisc/kernel/vdso32/sigtramp.o] Error 1
>>>> make[1]: *** [arch/parisc/Makefile:177: vdso_prepare] Error 2
>>>> make: *** [Makefile:219: __sub-make] Error 2
>>>>
>>>> This is with hppa64-linux-gcc (GCC) 11.2.0.
>>>
>>> Can you check if you have the 32-bit compiler (hppa-linux-gcc) installed too?
>>> The errors above happen when building the 32-bit vDSO, for which you need the 32-bit compiler.
>>>
>>
>> Yes, I do, but that doesn't help much if I want to build a 64-bit target such
>> as generic-64bit_defconfig. Am I missing something ?
>
> The 64-bit PA-RISC kernel now includes a built-in a 32-bit and a 64-bit vDSO for userspace.
> To build the 32-bit vDSO (vdso32) you need the 32-bit hppa compiler installed.
> That's what's being done above - see the path: arch/parisc/kernel/vdso32/
> Can you try "make V=1" to see the command line?
>
I am currently bisecting another problem. I'll try that afterwards.
Either case, how does one specify two cross compilers with two different
prefixes on the command line ?
Guenter
On 3/22/22 18:50, Guenter Roeck wrote:
>>>>> Building parisc64:generic-64bit_defconfig ... failed
>>>>> --------------
>>>>> Error log:
>>>>> arch/parisc/kernel/vdso64/Makefile:30: FORCE prerequisite is missing
>>>>> arch/parisc/kernel/vdso32/sigtramp.S: Assembler messages:
>>>>> arch/parisc/kernel/vdso32/sigtramp.S:39: Error: unknown pseudo-op: `.proc'
>>>>> ...
>>>>> arch/parisc/kernel/vdso32/restart_syscall.S:32: Error: .cfi_endproc without corresponding .cfi_startproc
>>>>> make[2]: *** [arch/parisc/kernel/vdso32/Makefile:34: arch/parisc/kernel/vdso32/restart_syscall.o] Error 1
>>>>> make[2]: *** Waiting for unfinished jobs....
>>>>> make[2]: *** [arch/parisc/kernel/vdso32/Makefile:34: arch/parisc/kernel/vdso32/sigtramp.o] Error 1
>>>>> make[1]: *** [arch/parisc/Makefile:177: vdso_prepare] Error 2
>>>>> make: *** [Makefile:219: __sub-make] Error 2
To recap - the solution was to add CROSS32_COMPILE=hppa-linux- , e.g.:
make ARCH=parisc CROSS_COMPILE=hppa64-linux- CROSS32_COMPILE=hppa-linux-
The better solution (for kernel >= v5.17) is to simply leave out the CROSS_COMPILE/CROSS32_COMPILE
parameters and let the Makefile autodetect everything:
make ARCH=parisc -> 32bit kernel
make ARCH=parisc64 -> 64bit kernel
It's now documented in the Wiki:
https://parisc.wiki.kernel.org/index.php/Cross_compiler_toolchain#How_to_build_the_kernel
Helge
On 3/22/22 16:19, Guenter Roeck wrote:
> On 3/22/22 07:25, Helge Deller wrote:
>> On 3/22/22 14:05, Guenter Roeck wrote:
>>> Does that also fix the build problems now seen in mainline ?
>>
>> No.
>>
>>> Building parisc64:generic-64bit_defconfig ... failed
>>> --------------
>>> Error log:
>>> arch/parisc/kernel/vdso64/Makefile:30: FORCE prerequisite is missing
>>> arch/parisc/kernel/vdso32/sigtramp.S: Assembler messages:
>>> arch/parisc/kernel/vdso32/sigtramp.S:39: Error: unknown pseudo-op: `.proc'
>>> ...
>>> arch/parisc/kernel/vdso32/restart_syscall.S:32: Error: .cfi_endproc without corresponding .cfi_startproc
>>> make[2]: *** [arch/parisc/kernel/vdso32/Makefile:34: arch/parisc/kernel/vdso32/restart_syscall.o] Error 1
>>> make[2]: *** Waiting for unfinished jobs....
>>> make[2]: *** [arch/parisc/kernel/vdso32/Makefile:34: arch/parisc/kernel/vdso32/sigtramp.o] Error 1
>>> make[1]: *** [arch/parisc/Makefile:177: vdso_prepare] Error 2
>>> make: *** [Makefile:219: __sub-make] Error 2
>>>
>>> This is with hppa64-linux-gcc (GCC) 11.2.0.
>>
>> Can you check if you have the 32-bit compiler (hppa-linux-gcc) installed too?
>> The errors above happen when building the 32-bit vDSO, for which you need the 32-bit compiler.
>>
>
> Yes, I do, but that doesn't help much if I want to build a 64-bit target such
> as generic-64bit_defconfig. Am I missing something ?
The 64-bit PA-RISC kernel now includes a built-in a 32-bit and a 64-bit vDSO for userspace.
To build the 32-bit vDSO (vdso32) you need the 32-bit hppa compiler installed.
That's what's being done above - see the path: arch/parisc/kernel/vdso32/
Can you try "make V=1" to see the command line?
Helge