Skip to content

Commit 725d19b

Browse files
committed
Add Global posix thread aka pthread Support
this flags enabled multithread support much like what I did in kitkat. SaberMod/android_build-OLD@93d3763 Change-Id: Id5559ec460b2ba84ed9cfe7a47b0ac59544e1d61 Signed-off-by: Paul Beeler <[email protected]>
1 parent bd6a606 commit 725d19b

File tree

2 files changed

+31
-8
lines changed

2 files changed

+31
-8
lines changed

core/binary.mk

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ else
9797
endif
9898
endif
9999

100+
##########################################################################
100101
# Copyright (C) 2014-2015 The SaberMod Project
101102
#
102103
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -110,22 +111,21 @@ endif
110111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
111112
# See the License for the specific language governing permissions and
112113
# limitations under the License.
113-
#
114-
115-
# Include custom gcc flags. Seperate them so they can be easily managed.
114+
##########################################################################
116115

117-
# arm thumb
118-
ifeq ($(strip $(ENABLE_ARM_THUMB_INTERWORK)),true)
119-
ifneq ($(strip $(LOCAL_IS_HOST_MODULE)),true)
120-
include $(BUILD_SYSTEM)/thumb_interwork.mk
121-
endif
116+
# arm thumb, not used on the host compiler.
117+
ifneq ($(strip $(LOCAL_IS_HOST_MODULE)),true)
118+
include $(BUILD_SYSTEM)/thumb_interwork.mk
122119
endif
123120

124121
# O3
125122
ifeq ($(strip $(O3_OPTIMIZATIONS)),true)
126123
include $(BUILD_SYSTEM)/O3.mk
127124
endif
128125

126+
# Add pthread support
127+
include $(BUILD_SYSTEM)/pthread.mk
128+
129129
# Do not use graphite on host modules or the clang compiler.
130130
ifneq ($(strip $(LOCAL_IS_HOST_MODULE)),true)
131131
ifneq ($(strip $(LOCAL_CLANG)),true)
@@ -135,6 +135,7 @@ ifneq ($(strip $(LOCAL_IS_HOST_MODULE)),true)
135135
endif
136136
endif
137137

138+
138139
#end SaberMod
139140

140141
# The following LOCAL_ variables will be modified in this file.

core/pthread.mk

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Copyright (C) 2015 The SaberMod Project
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
#
15+
# Add pthread flags globally
16+
ifneq (1,$(words $(filter $(LOCAL_DISABLE_PTHREAD),$(LOCAL_MODULE))))
17+
ifdef LOCAL_CFLAGS
18+
LOCAL_CFLAGS += -pthread
19+
else
20+
LOCAL_CFLAGS := -pthread
21+
endif
22+
endif

0 commit comments

Comments
 (0)