-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
misc pkgs: Darwin -> Linux cross compilation #46534
Merged
Ericson2314
merged 3 commits into
NixOS:master
from
obsidiansystems:darwin-to-linux-cross
Oct 24, 2018
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
32 changes: 32 additions & 0 deletions
32
pkgs/os-specific/linux/kernel-headers/no-dynamic-cc-version-check.patch
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
diff --git a/Makefile b/Makefile | ||
index 863f58503bee..b778d5023208 100644 | ||
--- a/Makefile | ||
+++ b/Makefile | ||
@@ -501,11 +501,9 @@ KBUILD_CFLAGS += $(call cc-option,-fno-PIE) | ||
KBUILD_AFLAGS += $(call cc-option,-fno-PIE) | ||
|
||
# check for 'asm goto' | ||
-ifeq ($(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-goto.sh $(CC) $(KBUILD_CFLAGS)), y) | ||
CC_HAVE_ASM_GOTO := 1 | ||
KBUILD_CFLAGS += -DCC_HAVE_ASM_GOTO | ||
KBUILD_AFLAGS += -DCC_HAVE_ASM_GOTO | ||
-endif | ||
|
||
# The expansion should be delayed until arch/$(SRCARCH)/Makefile is included. | ||
# Some architectures define CROSS_COMPILE in arch/$(SRCARCH)/Makefile. | ||
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include | ||
index 065324a8046f..d09c67194549 100644 | ||
--- a/scripts/Kbuild.include | ||
+++ b/scripts/Kbuild.include | ||
@@ -216,11 +216,8 @@ cc-disable-warning = $(call try-run-cached,\ | ||
cc-name = $(call shell-cached,$(CC) -v 2>&1 | grep -q "clang version" && echo clang || echo gcc) | ||
|
||
# cc-version | ||
-cc-version = $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh $(CC)) | ||
|
||
# cc-fullversion | ||
-cc-fullversion = $(shell $(CONFIG_SHELL) \ | ||
- $(srctree)/scripts/gcc-version.sh -p $(CC)) | ||
|
||
# cc-ifversion | ||
# Usage: EXTRA_CFLAGS += $(call cc-ifversion, -lt, 0402, -O1) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/arch/x86/Makefile b/arch/x86/Makefile | ||
index fad55160dcb9..a48c8331cbb2 100644 | ||
--- a/arch/x86/Makefile | ||
+++ b/arch/x86/Makefile | ||
@@ -239,7 +239,7 @@ ifdef CONFIG_RETPOLINE | ||
endif | ||
|
||
archscripts: scripts_basic | ||
- $(Q)$(MAKE) $(build)=arch/x86/tools relocs | ||
+ $(Q)$(MAKE) $(build)=arch/x86/tools | ||
|
||
### | ||
# Syscall table generation |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ugh... Another thing to report upstream, but it is probably fine for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well... it's arguably not a bug. I checked and this version is just used to work around bugs in old GCCs; I assume/hope newer GCCs are given better testing so hopefully it won't a happen again. But we could generate the actual version number thing just as a precaution.
Then again, upstream could provide the right hook in the configure script so faking this number wouldn't be downstream's burden.