| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Two fixes
1) Undefine GCC4.7/4.8 _GLIBCXX_ATOMIC_BUILTINS
Clang arm/mips can't compile the following atomic intrinsics yet
__atomic_fetch_add(__mem, __val, __ATOMIC_ACQ_REL);
__atomic_fetch_add(__mem, __val, __ATOMIC_ACQ_REL);
Use library calls instead
2) Undefine GCC4.7/4.8 _GLIBCXX_USE_FLOAT128. Clang doesn't support
__float128 yet
Change-Id: I0ff0eb208665beeb3e5e09917fd4c7dd378fc54e
|
|
|
|
|
|
|
|
|
| |
r191401 | jingyu | 2012-09-18 01:33:05 +0800 (Tue, 18 Sep 2012) | 6 lines
2012-09-17 Ben Cheng <bccheng@google.com
* config/arm/linux-elf.h (LINUX_TARGET_LINK_SPEC): Suppress the
dynamic linker commands for statically linked programs.
Change-Id: Ib8a27fb054ddb12242d500ef8b3ceb2b0215cb3e
|
|
|
|
|
|
|
|
|
|
| |
1. Fixed darwin build of GCC 4.8/X86 by removing trailing
',' from the last item of enum. Not discovered before
because GCC 4.8 now builds with -Wall -Werror, and gcc-4.2.1
in darwin is picky about that
2. Fixed -fuse-ld=mcld
Change-Id: I7b65edfb76841f14c3290acb5a98f556d00e1139
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In darwin where readelf isn't available, gcc/configure fails
to set HAVE_LD_PERSONALITY_RELAXATION for MIPS, causes
TARGET_WRITABLE_EH_FRAME=1 and flag_dwarf2_cfi_asm=0 (ie. disable
CFI directive), and fails ld.mcld
It's curious that the successful detection of the
/tmp/ndk-$USER/gcc/binutils-2.21/readelf requires binutils
to exist in the GCC's source tree, according to gcc/configure.
Other tools (objdump, nm, ld, as, etc) can be successfully
located because of OBJDUMP_FOR_TARGET, NM_FOR_TARGET, etc.
Fix to look for READELF_FOR_TARGET in gcc/configure
See
https://android-review.googlesource.com/#/c/54760
https://android-review.googlesource.com/#/c/54770
https://android-review.googlesource.com/#/c/54710
Change-Id: I8b057a70d43389d3d9d02b5c54b8365ebe6487d1
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Bionic setlocale() always returns NULL. Check return value before passing
it to other libraries which don't expect NULL in argument.
See 20ffc596a2771a96ac9b4a4838edc7779a48f0af
https://code.google.com/p/android/issues/detail?id=46718
Change-Id: Ie2bf30d5f54c77401519ecb27cb97fb905639bba
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=191571
2012-09-17 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/54563
* tree-ssa-math-opts.c (execute_cse_sincos): Call
gimple_purge_dead_eh_edges if last call has been changed.
* g++.dg/torture/pr54563.C: New test.
See https://code.google.com/p/android/issues/detail?id=52909
Change-Id: Ib0f8d0dd2faa5a8f0bdeb160da2e2cd0c24f5757
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Android does support SYS_gettid and SYS_futex which allows
libgomp to use libgomp/config/linux/* instead of
libgomp/config/posix and enables more features such as
thread affinity.
For GCC4.4.3/ARM, the missing linux/futex.h is copied from
GCC 4.6
Also guard the new sc_nprocessors_actu with __ANDROID__,
and fix return value in proc.c
Change-Id: Ib22496075ac5e41c5f44f5160d1b34a5609c168b
|
|/
|
|
| |
Change-Id: Ib97053768252b05decd513825ae45757b220f7d4
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
.PURPOSE
This patch is to improve the detection of total CPU count for OpenMP/Linux.
This patch helps that OpenMP recognizes the actual CPUs correctly for
the task parallelism.
Recent mobile devices dynamically disable or enable CPU cores on demand to
optimize battery life. This impacts the output of '/proc/cpuinfo' (which only
reports active ones). This patch provides a way to compute the total
number of cores by parsing the content of '/sys/devices/system/cpu/' instead.
Actual CPUs: total installed CPUs
Online's CPUs: CPUs of the turn-on status
Offline's CPUs: CPUs of the turn-off status
Therefore, We need to enhance the existing approach using procfs like
'/proc/cpuinfo/' or '/proc/stat'. This patch is suitable for Linux kernel.
This patch is based on GCC 4.7.2.
.RELATED LINKS:
https://android-review.googlesource.com/#/c/52821/
https://android-review.googlesource.com/#/c/51950/
https://android-review.googlesource.com/#/c/51370/
https://android.googlesource.com/toolchain/gcc/
.UNIT TEST
int main (int argc, char *argv[])
{ int nthreads, tid;
printf("SC_NPROCESSORS_ONLN: %d\n", sysconf (_SC_NPROCESSORS_ONLN));
/* Fork a team of threads giving them their own copies of variables */
{
/* Obtain thread number */
tid = omp_get_thread_num();
printf("Hello World from thread = %d\n", tid);
/* Only master thread does this */
if (tid == 0)
{
nthreads = omp_get_num_threads();
printf("Number of threads = %d\n", nthreads);
}
} /* All threads join master thread and disband */
}
.LIMITATION OF SCOPE
These functions have to be included in Bionic C library
as the resource of sysconf().
Examples:
_SC_NPROCESSORS_ONLN /proc/stat (= /sys/devices/system/cpu/online)
_SC_NPROCESSORS_CONF /proc/cpuinfo (= /sys/devices/system/cpu/online)
_SC_NPROCESSORS_ACTU /sys/devices/system/cpu/present (* Future work)
.COST EVALUATION OF SYSCALLS (On 32bit Quad core)
------------------------------------------
time seconds usecs/call calls syscall
------------------------------------------
-nan 0.000000 0 3 read
-nan 0.000000 0 9 write
-nan 0.000000 0 4 open
-nan 0.000000 0 4 close
-nan 0.000000 0 1 execve
-nan 0.000000 0 1 access
-nan 0.000000 0 1 brk
-nan 0.000000 0 1 munmap
-nan 0.000000 0 2 mprotect
-nan 0.000000 0 7 mmap2
-nan 0.000000 0 3 fstat64
-nan 0.000000 0 1 set_thread_area
------------------------------------------
100 0.000000 0 37 total
Change-Id: I2c6e41616f309eee89ee1145e92201ffe73463f4
Signed-off-by: Geunsik Lim <leemgs@gmail.com>
Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
Acked-by: Changwoo Min <multics69@gmail.com>
CC: David Turner <digit@android.com>
CC: Keith Obenschain <obenschaink@gmail.com>
CC: Pavel Chupin <pavel.v.chupin@intel.com>
CC: Andrew Hsieh <andrewhsieh@google.com>
|
|\ \ |
|
| | |
| | |
| | |
| | | |
Change-Id: I45ecaa7c20aece451664c631c01a3fefe054293a
|
| |/
|/|
| |
| |
| |
| |
| | |
See issue https://code.google.com/p/android/issues/detail?id=52732,
and fix http://gcc.gnu.org/ml/gcc-patches/2010-12/msg00732.html
Change-Id: If4759a637e5fb6f9c351c11b79d7f9f682ca2ab2
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
ARM/X86 GCC in NDK explicitly emit -m armelf_linux_eabi and -m elf_i386,
respectively, for linker. Fix MIPS to do the same, to help mclinker
which is built vanilla and relies on either filename (eg.
eg. arm-linux-androideabi-ld.mcd implies arm) or -mtriple/-march/-m
to figure out the target
Change-Id: I236786d0e90a3152225de1eea5e73e3de4ac3f84
|
| |
| |
| |
| |
| |
| | |
http://code.google.com/p/mclinker/
Change-Id: Ic9d88a86298eddaccf3c7da8405efb2b2f0d3e70
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
posix_memalign doesn't exist in NDK. Code inludes ?mmintrin.h
which in turn includes mm_malloc.h may fail to link
For AOSP platform build which uses the same compiler, add
-DHAVE_POSIX_MEMALIGN to restore the original behavior.
Other than non-zero return value which _mm_alloc already ignores, both
paths are functioanlly identical (under the hood dlmalloc.c in 32-bit
ensure alignment is at least 16-byte)
Change-Id: I55e9bb8b80e1b55baa9744920df10fcf83218300
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
They should be passed in configure to work correctly.
See https://android-review.googlesource.com/50815
Change-Id: I2aeb0375132ba985a51c397ee386af1ff4a47c32
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
|
|/
|
|
|
|
|
|
| |
2013-01-03 Jason Merrill <jason@redhat.com>
PR c++/55856
* semantics.c (build_data_member_initialization): Handle DECL_EXPR.
Change-Id: Ib34c16c4bc714875a49831ef8fb1691b392640cd
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
line #16514 "if (prev == BB_HEAD(bb))" causes segfault due to bb==NULL
when compiling external/llvm/lib/Transforms/Scalar/SROA.cpp
BUG: 8047767
------------------------------------------------------------------
r186451 | vries | 2012-04-14 05:17:41 -0700 (Sat, 14 Apr 2012) | 13 lines
2012-04-14 Tom de Vries <tom@codesourcery.com>
* cfgcleanup.c (try_optimize_cfg): Replace call to delete_insn_chain by
call to delete_insn. Remove code to reorder BASIC_BLOCK note and
DELETED_LABEL note, and move it to ...
* cfgrtl.c (delete_insn): ... here. Change return type to void.
(delete_insn_and_edges): Likewise.
(delete_insn_chain): Handle new return type of delete_insn. Delete
chain backwards rather than forwards.
* rtl.h (delete_insn, delete_insn_and_edges): Change return type to
void.
* cfglayout.c (fixup_reorder_chain): Delete unused label.
Change-Id: Ibc069a4267d063586003d49a805fb794f4041465
|
|
|
|
|
|
|
| |
Used to be first half of NDK local patch at $NDK/build/tools/
toolchain-patches/gcc/0006-Disable-libstdc-versioning.patch
Change-Id: I8ac0f14d20f32a4f946ffd6fd5756a2ab556e99b
|
|
|
|
|
|
|
|
| |
This reverts commit bd342f0491128ad15e6ea4ff241e243b753137c9
In favor of later/better fix in 75d889ea23f0ff1ecaa5cb79b435aca25460a4c9
Change-Id: Iae68d49b39b528d790c7404e657f3daa32a19864
|
|
|
|
|
|
|
|
|
| |
This is needed to provide "steady_clock" (or monotonic_clock in
GCC 4.6/4.4.3) in <chrono>
See http://code.google.com/p/android/issues/detail?id=39680
Change-Id: I0c31704971dc15751ce936f563de7c42a4e645a6
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Based on 1271761f530c0050154e8d526b95f952df551751,
92c478dba755a1a2f6f00ff390666acbffd41982, and
51df2e98d22e2c6f5d2a16860bc8fc3644179c1d.
With the following modifications:
1. Translate -pthread to -lc instead of -lpthread Android
doesn't have (has pthread* in libc.so instead)
2. Because of 1., we can restore to the original order of
LINUX_OR_ANDROID_LD
Change-Id: I505250c32b9908cb17bb269dc26e73c91669c07f
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The patch supports OpenMP library to parallelize the existing
C/C++ code (e.g: for task parallelism) rapidly/easily without
any modification of android platform on multicore embedded devices.
The original patch is made by Keith Obenschain (using GCC 4.4.3).
. Archive - https://android-review.googlesource.com/#/c/34491/
I just moved GCC version from 4.4.3 to 4.7.2 for ktoolchain
version 2.5. The patch is good to me when I evaluate a lot of
C/C++ source code with OpenMP's #parama. we move the version
of OpenMP from version 2.5 to version 3.1.
Please, refer to the "kandroid toolchain" menu in www.kandroid.org
to compile source code including bionic and openmp library on real
Android devices.
http://kandroid.org/board/board.php?board=toolchain&command=body&no=16
I tested Openmp library with the latest GCC 4.7.2 on Android/ARM
devices as following. Please refer to the below example.
geunsik@rhel6$> ./arm-linux-androideabi-gcc openmptest.c -L
/usr/local/ktoolchain-cortexa9-ver2.5-20120515-bionic/arm-linux-androideabi/lib
-lgomp -o openmptest [ENTER]
geunsik@rhel6$>
geunsik@rhel6$>
geunsik@rhel6$> file ./openmptest
./openmptest: ELF 32-bit LSB executable, ARM, version 1 (SYSV),
dynamically linked (uses shared libs), not stripped
Change-Id: I20cb3c1ac5c000445c043310158179723bd69fe2
Signed-off-by: Geunsik Lim <leemgs@gmail.com>
Acked-by: Geunsik Lim <geunsik.lim@gmail.com>
|
|/
|
|
|
|
|
|
|
|
|
| |
Fix a test in libstdc++/confiugre to include $glibcxx_thread_h instead
of gthr.h otherwise it will fail to detect gthread lib because the
new gthr.h only include gthr-default.h which doesn't exist in source
directory
See issue http://code.google.com/p/android/issues/detail?id=41770
Change-Id: I736b7ba2b472a26f9e43097bb88fb68325114a7d
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
For ARM w/o dmb a helper function is called for 64-bit atomic
built-in, which call __write when helper version is too old.
Change to call write instead for Android.
See http://code.google.com/p/android/issues/detail?id=41297
Change-Id: I98218576c5223628c0c76870623788f07675f6e5
|
|/
|
|
|
|
|
|
| |
See http://clang.llvm.org/cxx_status.html
http://code.google.com/p/android/issues/detail?id=39600
https://android-review.googlesource.com/#/c/47836/
Change-Id: I1e625592dcc66fa952e0965bf86e8255cac6ca72
|
| |
|
|
|
|
|
|
| |
See http://gcc.gnu.org/viewcvs?view=revision&revision=193554
Change-Id: I069da55efd2d75fc8b5ad518090660131d6fec05
|
|\ |
|
| |
| |
| |
| |
| |
| | |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55245
Change-Id: I3de4a11e2de0a144c70d5ce43f7b5bccb68fb671
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
See
http://code.google.com/p/android/issues/detail?id=35933
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54170
Backport of r194098 to both GCC 4.6 and 4.7
/cp
2012-12-03 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/54170
* cvt.c (cp_convert_to_pointer): Don't discard side-effects from
expressions of nullptr_t.
* typeck.c (build_ptrmemfunc): Likewise.
/testsuite
2012-12-03 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/54170
* g++.dg/cpp0x/lambda/lambda-nullptr.C: New.
Change-Id: I4c90f9e06262a54796302773b36eb5bac7b4f1fa
|
|
|
|
|
|
|
|
|
|
|
| |
Configured multilib:
> arm-eabi-gcc -print-multi-lib
.;
thumb;@mthumb
thumb/thumb2;@mthumb@march=armv7
Change-Id: Ie6d951929432610a7317dd37bdf12cb97544e1b4
|
|\ |
|
| |
| |
| |
| |
| |
| | |
See http://patchwork.ozlabs.org/patch/165025/
Change-Id: I369d8459cfe5baaf42ae9861fd7d8df8f90e48c2
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
To choose between "global" (default) and "tls" (new)
for -fstack-protector, -fstack-protector-all, and
-fstack-protector-strong (GCC 4.6+).
Note that this alone doesn't enable any -fstack-protector*
For NDK: The default "global" generates code backward
compatible with older bionic
For AOSP: build may add "-mstack-protector-guard=tls" to
build platform code with new bionic (*1)
Related CL:
https://android-review.googlesource.com/#/c/45416 (*1)
https://android-review.googlesource.com/#/c/45784
Change-Id: Iedf5b7ae5148572db2e35f0add93bc3d13511304
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Can be seen in logcat by messages:
E dalvikvm: Out-of-order map item: 0 then 0x70
E dalvikvm: ERROR: Byte swap + verify failed
BZ: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54985
Backport r192745 and children r192746, r192754, r192852:
PR tree-optimization/54985
* tree-ssa-threadedge.c (cond_arg_set_in_bb): New function
* extracted from thread_across_edge.
(thread_across_edge): Use it in all cases where we might thread
across a back edge.
* gcc.c-torture/execute/pr54985.c: New test.
Change-Id: I45e0185b1b729de91749272d62d3d331fcf1cf71
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Change 4.7.2 -> 4.7
In NDK gnu-libstdc++ is built seperately and copied over to
standalone. This change simplifies script doing that and make
it less sensitive to future minor version upgrade
Change-Id: I92e213906301cb48cdb53c64f205e82d60464be7
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Bionic setlocale() always returns NULL.
$NDK/tests/device/test-gnustl-2 (as well as others using
iostream, etc) segfault w/o this change
Port of google ref 46499.
Change-Id: I3fff815a365b0118d9a8362725a7267bccc93a8e
|
|/
|
|
|
|
|
|
|
| |
After https://android-review.googlesource.com/#/c/45416 bionic provides
stack-protector random value per each thread at %gs:20. Therefore return
compiler back to %gs:20 code gen, same as for glibc.
Change-Id: I76c68f0c99846d247f34e0ea781a7f1c305659b9
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
Used to be local NDK patch at $NDK/build/tools/toolchain-patches/
gcc/0010-Fix-missing-gthr-default.h-in-libstdc-build.patch
Change-Id: I0b198a3e1dc5be07668ce0092b972fec4f552f5a
|