Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
halo
build
Commits
b303d5d7
Commit
b303d5d7
authored
12 years ago
by
Ying Wang
Committed by
Gerrit Code Review
12 years ago
Browse files
Options
Download
Plain Diff
Merge "[MIPS] Update build rules"
parents
4703b491
6cc0c334
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
4 deletions
+15
-4
core/combo/TARGET_linux-mips.mk
core/combo/TARGET_linux-mips.mk
+15
-4
No files found.
core/combo/TARGET_linux-mips.mk
View file @
b303d5d7
...
...
@@ -91,7 +91,9 @@ TARGET_GLOBAL_CFLAGS += \
-ffunction-sections
\
-fdata-sections
\
-funwind-tables
\
-Wa
,--noexecstack
\
-Werror
=
format-security
\
-D_FORTIFY_SOURCE
=
1
\
$(arch_variant_cflags)
android_config_h
:=
$(
call
select
-android-config-h
,linux-mips
)
...
...
@@ -121,10 +123,13 @@ TARGET_GLOBAL_CFLAGS += -DPAGE_SHIFT=$(ARCH_MIPS_PAGE_SHIFT)
endif
TARGET_GLOBAL_LDFLAGS
+=
\
-Wl
,-z,noexecstack
\
-Wl
,-z,relro
\
-Wl
,-z,now
\
-Wl
,--warn-shared-textrel
\
$(arch_variant_ldflags)
TARGET_GLOBAL_CPPFLAGS
+=
-fvisibility-inlines-hidden
\
-fno-use-cxa-atexit
TARGET_GLOBAL_CPPFLAGS
+=
-fvisibility-inlines-hidden
# More flags/options can be added here
TARGET_RELEASE_CFLAGS
:=
\
...
...
@@ -160,7 +165,7 @@ TARGET_FDO_CFLAGS:=
TARGET_FDO_LIB
:=
target_libgcov
:=
$(
shell
$(TARGET_CC)
$(TARGET_GLOBAL_CFLAGS)
\
-
-print-file-name
=
libgcov.a
)
-print-file-name
=
libgcov.a
)
ifneq
($(strip $(BUILD_FDO_INSTRUMENT)),)
# Set BUILD_FDO_INSTRUMENT=true to turn on FDO instrumentation.
# The profile will be generated on /data/local/tmp/profile on the device.
...
...
@@ -224,7 +229,7 @@ define transform-o-to-shared-lib-inner
$(hide)
$(PRIVATE_CXX)
\
-nostdlib
-Wl,-soname,$(notdir
$@)
\
-Wl,--gc-sections
\
-shared
-Bsymbolic
\
-Wl,
-shared
,
-Bsymbolic
\
$(PRIVATE_TARGET_GLOBAL_LD_DIRS)
\
$(if
$(filter
true,$(PRIVATE_NO_CRT)),,$(PRIVATE_TARGET_CRTBEGIN_SO_O))
\
$(PRIVATE_ALL_OBJECTS)
\
...
...
@@ -254,6 +259,9 @@ $(hide) $(PRIVATE_CXX) -nostdlib -Bdynamic -fPIE -pie \
$(
call
normalize-target-libraries,
$(PRIVATE_ALL_SHARED_LIBRARIES)
)
\
$(
if
$(
filter
true
,
$(PRIVATE_NO_CRT)
)
,,
$(PRIVATE_TARGET_CRTBEGIN_DYNAMIC_O)
)
\
$(PRIVATE_ALL_OBJECTS)
\
-Wl
,--whole-archive
\
$(
call
normalize-target-libraries,
$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES)
)
\
-Wl
,--no-whole-archive
\
$(
if
$(PRIVATE_GROUP_STATIC_LIBRARIES)
,-Wl
$(comma)
--start-group
)
\
$(
call
normalize-target-libraries,
$(PRIVATE_ALL_STATIC_LIBRARIES)
)
\
$(
if
$(PRIVATE_GROUP_STATIC_LIBRARIES)
,-Wl
$(comma)
--end-group
)
\
...
...
@@ -273,6 +281,9 @@ $(hide) $(PRIVATE_CXX) -nostdlib -Bstatic \
$(PRIVATE_TARGET_GLOBAL_LDFLAGS)
\
$(PRIVATE_LDFLAGS)
\
$(PRIVATE_ALL_OBJECTS)
\
-Wl,--whole-archive
\
$(call
normalize-target-libraries,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES))
\
-Wl,--no-whole-archive
\
$(call
normalize-target-libraries,$(filter-out
%libc_nomalloc.a,$(filter-out
%libc.a,$(PRIVATE_ALL_STATIC_LIBRARIES))))
\
-Wl,--start-group
\
$(call
normalize-target-libraries,$(filter
%libc.a,$(PRIVATE_ALL_STATIC_LIBRARIES)))
\
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment