This repository has been archived by the owner on Nov 8, 2023. It is now read-only.
mirrored from https://android.googlesource.com/platform/bionic.git
-
Notifications
You must be signed in to change notification settings - Fork 372
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
versioner: compile headers in both C and C++ mode.
Bug: android/ndk#440 Test: python run_tests.py Change-Id: Ib572a8fdcc00f6b88a25003a085b16ce9698d692
- Loading branch information
Showing
17 changed files
with
122 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#if defined(__cplusplus) | ||
extern "C" { | ||
#endif | ||
|
||
#define __RENAME(x) __asm__(#x) | ||
|
||
#if defined(__cplusplus) | ||
extern "C++" char* basename(char*) __RENAME(__gnu_basename) __INTRODUCED_IN(23); | ||
extern "C++" const char* basename(const char*) __RENAME(__gnu_basename) __INTRODUCED_IN(23); | ||
#else | ||
char* basename(const char*) __RENAME(__gnu_basename) __INTRODUCED_IN(23); | ||
#endif | ||
|
||
char* foo() __INTRODUCED_IN(8); | ||
|
||
#if defined(__cplusplus) | ||
} | ||
#endif |
1 change: 1 addition & 0 deletions
1
tools/versioner/tests/extern_cpp/platforms/android-21/arch-arm/symbols/libc.so.functions.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
1 change: 1 addition & 0 deletions
1
tools/versioner/tests/extern_cpp/platforms/android-23/arch-arm/symbols/libc.so.functions.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
__gnu_basename |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
versioner headers -p platforms -r arm -a 21 -a 23 -i |
16 changes: 16 additions & 0 deletions
16
tools/versioner/tests/extern_cpp_mismatch/headers/string.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#if defined(__cplusplus) | ||
extern "C" { | ||
#endif | ||
|
||
#define __RENAME(x) __asm__(#x) | ||
|
||
#if defined(__cplusplus) | ||
extern "C++" char* basename(char*) __RENAME(__gnu_basename) __INTRODUCED_IN(23); | ||
extern "C++" const char* basename(const char*) __RENAME(__gnu_basename) __INTRODUCED_IN(23); | ||
#else | ||
char* basename(const char*) __RENAME(__gnu_basename) __INTRODUCED_IN(23); | ||
#endif | ||
|
||
#if defined(__cplusplus) | ||
} | ||
#endif |
1 change: 1 addition & 0 deletions
1
...oner/tests/extern_cpp_mismatch/platforms/android-9/arch-arm/symbols/libc.so.functions.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
foo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
versioner headers -p platforms -r arm -a 9 -i |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// <sys/timex.h> was causing a segfault when compiled in C++ mode because | ||
// versioner was trying to mangle the name of an unnamed bitfield. | ||
struct foo { | ||
int : 32; | ||
int : 32; | ||
int : 32; | ||
int : 32; | ||
}; |
1 change: 1 addition & 0 deletions
1
...rsioner/tests/unnamed_bitfield/platforms/android-9/arch-arm/symbols/libc.so.functions.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
foo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
versioner headers -p platforms -r arm -a 9 -i |