Created
November 15, 2023 13:17
-
-
Save bitristan/4c04e0ee8fcac3f167bd9f2b9ad5e9d8 to your computer and use it in GitHub Desktop.
ubuntu16.04编译linux-2.6.26源码修复编译错误
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/arch/x86/vdso/Makefile b/arch/x86/vdso/Makefile | |
index b7ad9f8..40bf07d 100644 | |
--- a/arch/x86/vdso/Makefile | |
+++ b/arch/x86/vdso/Makefile | |
@@ -69,7 +69,7 @@ vdso32.so-$(VDSO32-y) += sysenter | |
vdso32-images = $(vdso32.so-y:%=vdso32-%.so) | |
CPPFLAGS_vdso32.lds = $(CPPFLAGS_vdso.lds) | |
-VDSO_LDFLAGS_vdso32.lds = -m elf_i386 -Wl,-soname=linux-gate.so.1 | |
+VDSO_LDFLAGS_vdso32.lds = -m32 -Wl,-soname=linux-gate.so.1 | |
# This makes sure the $(obj) subdirectory exists even though vdso32/ | |
# is not a kbuild sub-make subdirectory. | |
diff --git a/kernel/mutex.c b/kernel/mutex.c | |
index d046a34..3b34db7 100644 | |
--- a/kernel/mutex.c | |
+++ b/kernel/mutex.c | |
@@ -58,7 +58,7 @@ EXPORT_SYMBOL(__mutex_init); | |
* We also put the fastpath first in the kernel image, to make sure the | |
* branch is predicted by the CPU as default-untaken. | |
*/ | |
-static void noinline __sched | |
+static __used void noinline __sched | |
__mutex_lock_slowpath(atomic_t *lock_count); | |
/*** | |
@@ -95,7 +95,7 @@ void inline __sched mutex_lock(struct mutex *lock) | |
EXPORT_SYMBOL(mutex_lock); | |
#endif | |
-static noinline void __sched __mutex_unlock_slowpath(atomic_t *lock_count); | |
+static __used noinline void __sched __mutex_unlock_slowpath(atomic_t *lock_count); | |
/*** | |
* mutex_unlock - release the mutex | |
diff --git a/kernel/timeconst.pl b/kernel/timeconst.pl | |
index eb51d76..0461239 100644 | |
--- a/kernel/timeconst.pl | |
+++ b/kernel/timeconst.pl | |
@@ -370,7 +370,7 @@ if ($hz eq '--can') { | |
} | |
@val = @{$canned_values{$hz}}; | |
- if (!defined(@val)) { | |
+ if (!@val) { | |
@val = compute_values($hz); | |
} | |
output($hz, @val); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
环境:
linux v2.6.26
ubuntu-16.04
make 3.81
gcc 5.4.0