Skip to contentSkip to conversation

compiler version for kernel builds

Linux-ia64 David Mosberger 3 participants 5 messages Mar 15, 2002 – Mar 27, 2002

lore
Share & tools
lore
#0 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Jesse Barnes

Jesse> David, which compiler version do you use for kernel builds Jesse> these days?

I usually use 3.0, though I try to remember to test with 2.96 from time to time. I haven't had much luck with 3.1 yet: it builds a working kernel for the simulator, but the kernel for the real machine dies early on. Haven't had time yet to investigate.

Jesse> Also, is there a document somewhere that
Jesse> describes building that version as a cross compiler? Last Jesse> time I tried building 3.0.2 as an x86 hosted ia64 cross Jesse> compiler, I ran into some trouble.

We posted something on this list a while ago (search for "recipe" or something like that). We haven't built a cross-compiler recently, so the recipe may not be perfectly accurate anymore.

	--david
#1 lore raw
Quoted 9 lines · David Mosberger
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Jesse Barnes

Jesse> David, which compiler version do you use for kernel builds Jesse> these days?

I usually use 3.0, though I try to remember to test with 2.96 from time to time. I haven't had much luck with 3.1 yet: it builds a working kernel for the simulator, but the kernel for the real machine dies early on. Haven't had time yet to investigate.

I can confirm that gcc-3_1-branch (as of yesterday) is still unable to build a working kernel.

A few days ago the most current 3.1 source wouldn't even compile the 2.4.17 kernel source. It was dying with an internal compiler error while attempting to compile linux/fs/jbd/journal.c. I submitted GCC PR 5892 which was fixed on 3/13.

Using a gcc built yesterday from the gcc-3_1-branch containing the above fix I hit a link-time error due to an unresolved reference to __xchg_called_with_bad_pointer. We determined that this problem was due to a change in the compiler inlining behavior where static inline functions over a certain size are no longer being inlined by default. It appears that we will need to use -finline-limit=n to force inlining of larger functions. After adding -finline-limit 00 the kernel compiles and links. Unfortunately, it hangs right away when you try to boot it.

I'll let you if we learn more.

Gary

Quoted 17 lines

Jesse> Also, is there a document somewhere that
Jesse> describes building that version as a cross compiler? Last Jesse> time I tried building 3.0.2 as an x86 hosted ia64 cross Jesse> compiler, I ran into some trouble.

We posted something on this list a while ago (search for "recipe" or something like that). We haven't built a cross-compiler recently, so the recipe may not be perfectly accurate anymore.

	--david

_______________________________________________
Linux-IA64 mailing list
[email protected]
http://lists.linuxia64.org/lists/listinfo/linux-ia64

Signature · 5 lines
Gary Hade
IBM Linux Technology Center
503-578-4503  IBM T/L: 775-4503
[email protected]
http://www.ibm.com/linux/ltc
#2 lore raw
In reply to David Mosberger
Quoted 9 lines · David Mosberger
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Jesse Barnes

Jesse> David, which compiler version do you use for kernel builds Jesse> these days?

I usually use 3.0, though I try to remember to test with 2.96 from time to time. I haven't had much luck with 3.1 yet: it builds a working kernel for the simulator, but the kernel for the real machine dies early on. Haven't had time yet to investigate.

I have just tested 3.0.5 (20020316) and I can't get a booting 2.5.7pre1 kernel built with that toolchain.

Seems it's not just 3.1+ thats borked ;-(

Jes
c

#3 lore raw
In reply to David Mosberger

FYI, earlier this afternoon I was able to successfully build and boot an IA-64 2.4.18 kernel built with:

	gcc version 3.1 20020327 (prerelease)

The GCC problem that was previously preventing a successful boot was isolated by Chris McDermott and Steve Christiansen. It was fixed earlier today by Richard Henderson.
GCC PR 6054 (GCC 3.1 for ia64 fails to restore gp after
indirect call in Linux kernel)

Gary

Quoted 62 lines · Gary Hade
Quoted 9 lines · David Mosberger
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Jesse Barnes

Jesse> David, which compiler version do you use for kernel builds Jesse> these days?

I usually use 3.0, though I try to remember to test with 2.96 from time to time. I haven't had much luck with 3.1 yet: it builds a working kernel for the simulator, but the kernel for the real machine dies early on. Haven't had time yet to investigate.

I can confirm that gcc-3_1-branch (as of yesterday) is still unable to build a working kernel.

A few days ago the most current 3.1 source wouldn't even compile the 2.4.17 kernel source. It was dying with an internal compiler error while attempting to compile linux/fs/jbd/journal.c. I submitted GCC PR 5892 which was fixed on 3/13.

Using a gcc built yesterday from the gcc-3_1-branch containing the above fix I hit a link-time error due to an unresolved reference to __xchg_called_with_bad_pointer. We determined that this problem was due to a change in the compiler inlining behavior where static inline functions over a certain size are no longer being inlined by default. It appears that we will need to use -finline-limit=n to force inlining of larger functions. After adding -finline-limit 00 the kernel compiles and links. Unfortunately, it hangs right away when you try to boot it.

I'll let you if we learn more.

Gary

Quoted 17 lines

Jesse> Also, is there a document somewhere that
Jesse> describes building that version as a cross compiler? Last Jesse> time I tried building 3.0.2 as an x86 hosted ia64 cross Jesse> compiler, I ran into some trouble.

We posted something on this list a while ago (search for "recipe" or something like that). We haven't built a cross-compiler recently, so the recipe may not be perfectly accurate anymore.

	--david

_______________________________________________
Linux-IA64 mailing list
[email protected]
http://lists.linuxia64.org/lists/listinfo/linux-ia64

Signature · 10 lines
Gary Hade
IBM Linux Technology Center
503-578-4503  IBM T/L: 775-4503
[email protected]
http://www.ibm.com/linux/ltc

_______________________________________________
Linux-IA64 mailing list
[email protected]
http://lists.linuxia64.org/lists/listinfo/linux-ia64
#4 lore raw
In reply to David Mosberger
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Gary Hade

Gary> FYI, earlier this afternoon I was able to successfully build Gary> and boot an IA-64 2.4.18 kernel built with: gcc version 3.1 Gary> 20020327 (prerelease)

Gary> The GCC problem that was previously preventing a successful Gary> boot was isolated by Chris McDermott and Steve Christiansen. Gary> It was fixed earlier today by Richard Henderson. GCC PR 6054 Gary> (GCC 3.1 for ia64 fails to restore gp after indirect call in Gary> Linux kernel)

Very good. One thing less to worry about.

Thanks,

	--david