Skip to contentSkip to conversation

fix userspace compile error in gcc_intrin.h

IA64 David Woodhouse 2 participants 3 messages Feb 29, 2008 – Mar 1, 2008 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 27 lines · Linux Kernel Mailing List
Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0df29025fd0379d5950d206314d0b10a2c8a9607
Commit:     0df29025fd0379d5950d206314d0b10a2c8a9607
Parent:     d2fc0bacd5c438cb459fdf531eff00ab18422a00
Author:     Doug Chapman <[email protected]>
AuthorDate: Mon Jan 28 15:33:28 2008 -0800
Committer:  Tony Luck <[email protected]>
CommitDate: Mon Feb 4 15:08:25 2008 -0800

[IA64] fix userspace compile error in gcc_intrin.h

Fixes userspace build errors when linux/ipv6.h is included such as in the dhcpv6 package under fedora. Likely causes other userspace build errors as well. I found this in akpm's tree from 2.6.18 but could not find any case of anyone proposing it for the main tree.

---
 include/asm-ia64/gcc_intrin.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
include/asm-ia64/gcc_intrin.h +0 -0
index 5b6665c..de2ed2c 100644

include/asm-ia64/gcc_intrin.h line 32

Quoted 9 lines
include/asm-ia64/gcc_intrin.h +2 -0
@@ -24,7 +24,9 @@
 extern void ia64_bad_param_for_setreg (void);
 extern void ia64_bad_param_for_getreg (void);
 
+#ifdef __KERNEL__
 register unsigned long ia64_r13 asm ("r13") __used;
+#endif
 
 #define ia64_setreg(regnum, val)						\
 ({										\

You also want to move gcc_interin.h from $(header-y) to $(unifdef-y) in include/asm-ia64/Kbuild.

Signature · 1 line
dwmw2
#2 lore raw
Quoted 35 lines · David Woodhouse
Quoted 34 lines · Linux Kernel Mailing List
Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0df29025fd0379d5950d206314d0b10a2c8a9607
Commit:     0df29025fd0379d5950d206314d0b10a2c8a9607
Parent:     d2fc0bacd5c438cb459fdf531eff00ab18422a00
Author:     Doug Chapman <[email protected]>
AuthorDate: Mon Jan 28 15:33:28 2008 -0800
Committer:  Tony Luck <[email protected]>
CommitDate: Mon Feb 4 15:08:25 2008 -0800

[IA64] fix userspace compile error in gcc_intrin.h

Fixes userspace build errors when linux/ipv6.h is included such as in the dhcpv6 package under fedora. Likely causes other userspace build errors as well. I found this in akpm's tree from 2.6.18 but could not find any case of anyone proposing it for the main tree.

---
 include/asm-ia64/gcc_intrin.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
include/asm-ia64/gcc_intrin.h +2 -0
index 5b6665c..de2ed2c 100644
@@ -24,7 +24,9 @@
 extern void ia64_bad_param_for_setreg (void);
 extern void ia64_bad_param_for_getreg (void);
 
+#ifdef __KERNEL__
 register unsigned long ia64_r13 asm ("r13") __used;
+#endif
 
Quoted 6 lines

include/asm-ia64/gcc_intrin.h line 32

Quoted 2 lines
include/asm-ia64/gcc_intrin.h +0 -0
 #define ia64_setreg(regnum, val)						\
 ({										\

You also want to move gcc_interin.h from $(header-y) to $(unifdef-y) in include/asm-ia64/Kbuild.

David,

Thanks for catching that. I will post a patch for the Kbuild part later today.

- Doug

#3 lore raw
Quoted 2 lines · Doug Chapman

Thanks for catching that. I will post a patch for the Kbuild part later today.

There's also a bunch of other stuff in that file which looks like perhaps it shouldn't be exposed to userspace.

Signature · 1 line
dwmw2