LiS 2.17.X & mregparm=0
Paul Landay <[email protected]>
| Newsgroups | gmane.linux.kernel.streams |
|---|---|
| Message-ID | <[email protected]> |
On a 2.6 kernel without CONFIG_REGPARM the LiS 2.17.X level
fails to compile. The gcc 3.3.3 complains with messages about:
'regparm=0' is an invalid 'cc' flag
and
"regparm attribute directive ignored"
Below are changes which allow the compile to complete in that
environment. These changes will not hurt when LiS 2.17.X is
used on a 2.6 kernel that does use CONFIG_REGPARM. I have not
tried LiS 2.17.X on a 2.4 kernel.
diff -Naur LiS-2.17.X-orig/Configure LiS-2.17.X-RegP/Configure
--- LiS-2.17.X-orig/Configure 2004-09-10 11:48:21.000000000 -0400
+++ LiS-2.17.X-RegP/Configure 2004-09-27 11:27:16.378550000 -0400
@@ -990,10 +990,10 @@
if [ "$regparm_defined..." = "y..." ]; then
CCREGPARM="-mregparm=3"
else
- CCREGPARM="-mregparm=0"
+ CCREGPARM="-Dregparm=0"
fi
else
- CCREGPARM="-mregparm=0"
+ CCREGPARM="-Dregparm=0"
fi
if [ "$CCREGPARM" = "-mregparm=3" ]; then
echo "Kernel compiled using register passing for parameters"
diff -Naur LiS-2.17.X-orig/mkgenconf LiS-2.17.X-RegP/mkgenconf
--- LiS-2.17.X-orig/mkgenconf 2004-09-10 11:48:41.000000000 -0400
+++ LiS-2.17.X-RegP/mkgenconf 2004-09-27 11:10:57.408550000 -0400
@@ -33,7 +33,12 @@
CCREGPARM=`echo $CCREGPARM | sed -e's/.*=//'`
echo "#define CCREGPARM $CCREGPARM" >>$f
if [ "$TARGET" = "l" ]; then
+ if [ "$CCREGPARM" = "0" ]
+ then
+ echo "#define _RP " >>$f
+ else
echo "#define _RP __attribute__ ((regparm($STREAMS_REGPARM)))"
>>$f
+ fi
else
echo "#define _RP " >>$f
fi
Paul Landay