The Mac linker doesn't understand --start-group, which is needed for
properly linking libgcc/libc statically. It isn't needed for dynamic
executables though, so use that driver behavior where appropriate.
Bug: 19567451
Change-Id: Ifeb03bea55bc87561c64ddafdb99f664fef0f00e
BUILD_HOST_static=1 forces all host binaries to be statically linked.
Since -nodefaultlibs was passed (to disable libstdc++), libgcc wasn't
being passed. This change emulates the driver's behavior.
Also fix default STL selection for BUILD_HOST_static.
Bug: 19567451
Change-Id: I617aab782d40ac76ca5a7d9dddf0f202a4e3a69b
http://llvm.org/bugs/show_bug.cgi?id=15086,
llvm tail call optimization is wrong for x86.
For Android/x86 to use SSE* instructions safely, stack should be 16-byte
aligned before JNI function call, which isn't true for all x86 device,
so -mstackrealign should be the default.
BUG: 19234330
Change-Id: I4c6676366788772dbe64fd7f0dd33b3ed5c9b80e
Previously if user has a directory with name dummy in the root of the
source tree, "zip -qd package.apk dummy" fails with:
"zip error: Nothing to do!".
This change mitigates the error.
Change-Id: I642e3bf0378e5b9911a068ecb72f795b3e92f1fe
- Add a new flag to zipalign (-p) that page aligns shared
libraries (zip entries ending with ".so") in the archive.
- Add a new build variable LOCAL_PAGE_ALIGN_SHARED_LIBRARIES
to turn on this behaviour in zipalign.
- Add a new LOCAL_JNI_SHARED_LIBRARIES_ZIP_OPTIONS to control
zip behaviour.
Bug: 8076853
Bug: 19330157
Co-Authored-By: Simon Baldwin <simonb@google.com>
Co-Authored-By: Dimitry Ivanov <dimitry@google.com>
Change-Id: I1aa2c039bb2a590ae72f256acc9ba5401c2c59b1
These CFLAGS and CPPFLAGS will always be added last, and are
controlled by the build system. This way we can add warnings that
users are not allowed to disable.
Change-Id: Id71f69249078f62ca2687ecbf764aff0fd3a1c1b
Implicit function declarations are much more dangerous on LP64 because
sizeof(int) != sizeof(void*), so any function that returns a pointer will
lose its top bits, leading to relatively hard to debug crashes.
Change-Id: Ia05beffb949ca747833c2e12c40daf896f7a60a5
Implicit function declarations are much more dangerous on LP64 because
sizeof(int) != sizeof(void*), so any function that returns a pointer will
lose its top bits, leading to relatively hard to debug crashes.
Change-Id: Ib2570326dde1b1cde09c63c9b4c973d741528ee2
We don't support platform builds under CYGWIN and can safely
assume that all windows host builds are for MinGW32.
HAVE_WINSOCK2_H is currently unused. The only references to it
are in code that define it themselves or in application code that
by definition isn't compiled for windows.
Change-Id: I236d6e070df93f713cb716bb8a461c9c1d32a180