Lines 265-270
build_cflags() {
Link Here
|
265 |
if [ -n "$BUILD_PARAMS" ]; then |
265 |
if [ -n "$BUILD_PARAMS" ]; then |
266 |
CFLAGS="$CFLAGS -D$BUILD_PARAMS" |
266 |
CFLAGS="$CFLAGS -D$BUILD_PARAMS" |
267 |
fi |
267 |
fi |
|
|
268 |
|
269 |
# Check if gcc supports asm goto and set CC_HAVE_ASM_GOTO if it does. |
270 |
# Older kernels perform this check and set this flag in Kbuild, and since |
271 |
# conftest.sh runs outside of Kbuild it ends up building without this flag. |
272 |
# Starting with commit e9666d10a5677a494260d60d1fa0b73cc7646eb3 this test |
273 |
# is done within Kconfig, and the preprocessor flag is no longer needed. |
274 |
|
275 |
GCC_GOTO_SH="$SOURCES/build/gcc-goto.sh" |
276 |
|
277 |
if [ -f "$GCC_GOTO_SH" ]; then |
278 |
# Newer versions of gcc-goto.sh don't print anything on success, but |
279 |
# this is okay, since it's no longer necessary to set CC_HAVE_ASM_GOTO |
280 |
# based on the output of those versions of gcc-goto.sh. |
281 |
if [ `/bin/sh "$GCC_GOTO_SH" "$CC"` = "y" ]; then |
282 |
CFLAGS="$CFLAGS -DCC_HAVE_ASM_GOTO" |
283 |
fi |
284 |
fi |
268 |
} |
285 |
} |
269 |
|
286 |
|
270 |
CONFTEST_PREAMBLE="#include \"conftest.h\" |
287 |
CONFTEST_PREAMBLE="#include \"conftest.h\" |
Lines 1521-1526
compile_test() {
Link Here
|
1521 |
compile_check_conftest "$CODE" "NV_DRM_AVAILABLE" "" "generic" |
1538 |
compile_check_conftest "$CODE" "NV_DRM_AVAILABLE" "" "generic" |
1522 |
;; |
1539 |
;; |
1523 |
|
1540 |
|
|
|
1541 |
drm_driver_prime_flag_present) |
1542 |
# |
1543 |
# Determine whether driver feature flag DRIVER_PRIME is present. |
1544 |
# |
1545 |
# The DRIVER_PRIME flag was added by commit 3248877ea179 (drm: |
1546 |
# base prime/dma-buf support (v5)) in v3.4 (2011-11-25) and is |
1547 |
# removed by commit 0424fdaf883a (drm/prime: Actually remove |
1548 |
# DRIVER_PRIME everywhere) on 2019-06-17. |
1549 |
# |
1550 |
# DRIVER_PRIME definition moved from drmP.h to drm_drv.h by |
1551 |
# commit 85e634bce01a (drm: Extract drm_drv.h) in v4.10 |
1552 |
# (2016-11-14). |
1553 |
# |
1554 |
# DRIVER_PRIME define is changed to enum value by commit |
1555 |
# 0e2a933b02c9 (drm: Switch DRIVER_ flags to an enum) in v5.1 |
1556 |
# (2019-01-29). |
1557 |
# |
1558 |
CODE=" |
1559 |
#include <drm/drmP.h> |
1560 |
#if defined(NV_DRM_DRM_DRV_H_PRESENT) |
1561 |
#include <drm/drm_drv.h> |
1562 |
#endif |
1563 |
unsigned int drm_driver_prime_flag_present_conftest(void) { |
1564 |
return DRIVER_PRIME; |
1565 |
}" |
1566 |
|
1567 |
compile_check_conftest "$CODE" "NV_DRM_DRIVER_PRIME_FLAG_PRESENT" "" "types" |
1568 |
;; |
1569 |
|
1524 |
proc_create_data) |
1570 |
proc_create_data) |
1525 |
# |
1571 |
# |
1526 |
# Determine if the proc_create_data() function is present. |
1572 |
# Determine if the proc_create_data() function is present. |