Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3488)

Unified Diff: build/toolchain.gypi

Issue 1160973006: MIPS: Improve --rpath and --dynamic-linker handling in gyp. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix nits. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/toolchain.gypi
diff --git a/build/toolchain.gypi b/build/toolchain.gypi
index ed2616bbdb92b302a9074275c50acd0f01cf05a8..4dbf42bfe3795c6ba16ab24dcef82914dd8dadd5 100644
--- a/build/toolchain.gypi
+++ b/build/toolchain.gypi
@@ -338,6 +338,26 @@
],
'cflags': ['-march=i586'],
}], # v8_target_arch=="x87"
+ ['(v8_target_arch=="mips" or v8_target_arch=="mipsel" \
+ or v8_target_arch=="mips64el") and v8_target_arch==target_arch', {
+ 'target_conditions': [
+ ['_toolset=="target"', {
+ # Target built with a Mips CXX compiler.
+ 'variables': {
+ 'ldso_path%': '<!(/bin/echo -n $LDSO_PATH)',
+ 'ld_r_path%': '<!(/bin/echo -n $LD_R_PATH)',
+ },
+ 'conditions': [
+ ['ldso_path!=""', {
+ 'ldflags': ['-Wl,--dynamic-linker=<(ldso_path)'],
+ }],
+ ['ld_r_path!=""', {
+ 'ldflags': ['-Wl,--rpath=<(ld_r_path)'],
+ }],
+ ],
+ }],
+ ],
+ }],
['v8_target_arch=="mips"', {
'defines': [
'V8_TARGET_ARCH_MIPS',
@@ -384,11 +404,7 @@
],
'cflags!': ['-mfp32', '-mfpxx'],
'cflags': ['-mips32r6', '-Wa,-mips32r6'],
- 'ldflags': [
- '-mips32r6',
- '-Wl,--dynamic-linker=$(LDSO_PATH)',
- '-Wl,--rpath=$(LD_R_PATH)',
- ],
+ 'ldflags': ['-mips32r6'],
}],
['mips_arch_variant=="r2"', {
'conditions': [
@@ -571,11 +587,7 @@
],
'cflags!': ['-mfp32', '-mfpxx'],
'cflags': ['-mips32r6', '-Wa,-mips32r6'],
- 'ldflags': [
- '-mips32r6',
- '-Wl,--dynamic-linker=$(LDSO_PATH)',
- '-Wl,--rpath=$(LD_R_PATH)',
- ],
+ 'ldflags': ['-mips32r6'],
}],
['mips_arch_variant=="r2"', {
'conditions': [
@@ -770,20 +782,12 @@
['mips_arch_variant=="r6"', {
'defines': ['_MIPS_ARCH_MIPS64R6',],
'cflags': ['-mips64r6', '-mabi=64', '-Wa,-mips64r6'],
- 'ldflags': [
- '-mips64r6', '-mabi=64',
- '-Wl,--dynamic-linker=$(LDSO_PATH)',
- '-Wl,--rpath=$(LD_R_PATH)',
- ],
+ 'ldflags': ['-mips64r6', '-mabi=64'],
}],
['mips_arch_variant=="r2"', {
'defines': ['_MIPS_ARCH_MIPS64R2',],
'cflags': ['-mips64r2', '-mabi=64', '-Wa,-mips64r2'],
- 'ldflags': [
- '-mips64r2', '-mabi=64',
- '-Wl,--dynamic-linker=$(LDSO_PATH)',
- '-Wl,--rpath=$(LD_R_PATH)',
- ],
+ 'ldflags': ['-mips64r2', '-mabi=64'],
}],
],
}, {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698