Lines 67-72
Link Here
|
67 |
} |
67 |
} |
68 |
|
68 |
|
69 |
build_cflags() { |
69 |
build_cflags() { |
|
|
70 |
ARCH=`uname -m | sed -e 's/i.86/i386/'` |
71 |
|
70 |
BASE_CFLAGS="-D__KERNEL__ \ |
72 |
BASE_CFLAGS="-D__KERNEL__ \ |
71 |
-DKBUILD_BASENAME=\"#conftest$$\" -DKBUILD_MODNAME=\"#conftest$$\" \ |
73 |
-DKBUILD_BASENAME=\"#conftest$$\" -DKBUILD_MODNAME=\"#conftest$$\" \ |
72 |
-nostdinc -isystem $ISYSTEM" |
74 |
-nostdinc -isystem $ISYSTEM" |
Lines 80-95
Link Here
|
80 |
test_xen |
82 |
test_xen |
81 |
|
83 |
|
82 |
if [ "$OUTPUT" != "$SOURCES" ]; then |
84 |
if [ "$OUTPUT" != "$SOURCES" ]; then |
83 |
ARCH=`uname -m | sed -e 's/i.86/i386/'` |
|
|
84 |
MACH_CFLAGS="-I$HEADERS/asm-$ARCH/mach-default" |
85 |
MACH_CFLAGS="-I$HEADERS/asm-$ARCH/mach-default" |
85 |
if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" ]; then |
86 |
if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" ]; then |
86 |
MACH_CFLAGS="$MACH_CFLAGS -I$HEADERS/asm-x86/mach-default" |
87 |
MACH_CFLAGS="$MACH_CFLAGS -I$HEADERS/asm-x86/mach-default" |
|
|
88 |
MACH_CFLAGS="$MACH_CFLAGS -I$SOURCES/arch/x86/include/asm/mach-default" |
87 |
fi |
89 |
fi |
88 |
if [ "$XEN_PRESENT" != "0" ]; then |
90 |
if [ "$XEN_PRESENT" != "0" ]; then |
89 |
MACH_CFLAGS="-I$HEADERS/asm-$ARCH/mach-xen $MACH_CFLAGS" |
91 |
MACH_CFLAGS="-I$HEADERS/asm-$ARCH/mach-xen $MACH_CFLAGS" |
90 |
fi |
92 |
fi |
91 |
else |
93 |
else |
92 |
MACH_CFLAGS="-I$HEADERS/asm/mach-default" |
94 |
MACH_CFLAGS="-I$HEADERS/asm/mach-default" |
|
|
95 |
if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" ]; then |
96 |
MACH_CFLAGS="$MACH_CFLAGS -I$HEADERS/asm-x86/mach-default" |
97 |
MACH_CFLAGS="$MACH_CFLAGS -I$SOURCES/arch/x86/include/asm/mach-default" |
98 |
fi |
93 |
if [ "$XEN_PRESENT" != "0" ]; then |
99 |
if [ "$XEN_PRESENT" != "0" ]; then |
94 |
MACH_CFLAGS="-I$HEADERS/asm/mach-xen $MACH_CFLAGS" |
100 |
MACH_CFLAGS="-I$HEADERS/asm/mach-xen $MACH_CFLAGS" |
95 |
fi |
101 |
fi |
Lines 97-102
Link Here
|
97 |
|
103 |
|
98 |
CFLAGS="$BASE_CFLAGS $MACH_CFLAGS $OUTPUT_CFLAGS -I$HEADERS" |
104 |
CFLAGS="$BASE_CFLAGS $MACH_CFLAGS $OUTPUT_CFLAGS -I$HEADERS" |
99 |
|
105 |
|
|
|
106 |
if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" ]; then |
107 |
CFLAGS="$CFLAGS -I$SOURCES/arch/x86/include" |
108 |
fi |
100 |
if [ -n "$BUILD_PARAMS" ]; then |
109 |
if [ -n "$BUILD_PARAMS" ]; then |
101 |
CFLAGS="$CFLAGS -D$BUILD_PARAMS" |
110 |
CFLAGS="$CFLAGS -D$BUILD_PARAMS" |
102 |
fi |
111 |
fi |
Lines 858-864
Link Here
|
858 |
|
867 |
|
859 |
if [ -f conftest$$.o ]; then |
868 |
if [ -f conftest$$.o ]; then |
860 |
rm -f conftest$$.o |
869 |
rm -f conftest$$.o |
861 |
echo "#undef NV_ON_EACH_CPU" >> conftest.h |
870 |
echo "#undef NV_ON_EACH_CPU_PRESENT" >> conftest.h |
862 |
return |
871 |
return |
863 |
fi |
872 |
fi |
864 |
|
873 |
|
Lines 897-902
Link Here
|
897 |
fi |
906 |
fi |
898 |
;; |
907 |
;; |
899 |
|
908 |
|
|
|
909 |
acpi_evaluate_integer) |
910 |
# |
911 |
# Determine if the acpi_evaluate_integer() function is |
912 |
# present and the type of its 'data' argument. |
913 |
# |
914 |
|
915 |
echo "$CONFTEST_PREAMBLE |
916 |
#include <acpi/acpi_bus.h> |
917 |
acpi_status acpi_evaluate_integer(acpi_handle h, acpi_string s, |
918 |
struct acpi_object_list *l, unsigned long long *d) { |
919 |
return AE_OK; |
920 |
}" > conftest$$.c |
921 |
|
922 |
$CC $CFLAGS -c conftest$$.c > /dev/null 2>&1 |
923 |
rm -f conftest$$.c |
924 |
|
925 |
if [ -f conftest$$.o ]; then |
926 |
rm -f conftest$$.o |
927 |
echo "#define NV_ACPI_EVALUATE_INTEGER_PRESENT" >> conftest.h |
928 |
echo "typedef unsigned long long nv_acpi_integer_t;" >> conftest.h |
929 |
return |
930 |
fi |
931 |
|
932 |
echo "$CONFTEST_PREAMBLE |
933 |
#include <acpi/acpi_bus.h> |
934 |
acpi_status acpi_evaluate_integer(acpi_handle h, acpi_string s, |
935 |
struct acpi_object_list *l, unsigned long *d) { |
936 |
return AE_OK; |
937 |
}" > conftest$$.c |
938 |
|
939 |
$CC $CFLAGS -c conftest$$.c > /dev/null 2>&1 |
940 |
rm -f conftest$$.c |
941 |
|
942 |
if [ -f conftest$$.o ]; then |
943 |
rm -f conftest$$.o |
944 |
echo "#define NV_ACPI_EVALUATE_INTEGER_PRESENT" >> conftest.h |
945 |
echo "typedef unsigned long nv_acpi_integer_t;" >> conftest.h |
946 |
return |
947 |
else |
948 |
# |
949 |
# We can't report a compile test failure here because |
950 |
# this is a catch-all for both kernels that don't |
951 |
# have acpi_evaluate_integer() and kernels that have |
952 |
# broken header files that make it impossible to |
953 |
# tell if the function is present. |
954 |
# |
955 |
echo "#undef NV_ACPI_EVALUATE_INTEGER_PRESENT" >> conftest.h |
956 |
echo "typedef unsigned long nv_acpi_integer_t;" >> conftest.h |
957 |
fi |
958 |
;; |
959 |
|
900 |
esac |
960 |
esac |
901 |
} |
961 |
} |
902 |
|
962 |
|