Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions test/aarch64-none-linux-gnu/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ cc_binary(
linkopts = [
"-nostartfiles",
"-Wl,--entry,main",
"-lm",
],
deps = [":arm_library"],
)
Expand Down
5 changes: 5 additions & 0 deletions test/aarch64-none-linux-gnu/library.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "library.h"
#include <vector>
#include <cmath>

uint16_t baz(uint8_t a) { return a * 2; }

Expand All @@ -13,3 +14,7 @@ uint16_t foobaz() {
vec.push_back(1);
return vec[0];
}

double math_fn(double val) {
return sin(val);
}
1 change: 1 addition & 0 deletions test/aarch64-none-linux-gnu/library.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
uint16_t baz(uint8_t var);
uint32_t foo(void);
uint16_t foobaz();
double math_fn(double val);
3 changes: 3 additions & 0 deletions test/aarch64-none-linux-gnu/main.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
// The simplest possible main function
#include "library.h"
#include <iostream>

int main(){
std::cout << math_fn(10) << "\n";
return 0;
}
3 changes: 3 additions & 0 deletions test/arm-none-linux-gnueabihf/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ cc_binary(
"-mcpu=cortex-a5",
"-mthumb",
],
linkopts = [
"-lm",
],
deps = [":arm_library"],
)

Expand Down
5 changes: 5 additions & 0 deletions test/arm-none-linux-gnueabihf/library.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "library.h"
#include <vector>
#include <cmath>

uint16_t baz(uint8_t a) { return a * 2; }

Expand All @@ -13,3 +14,7 @@ uint16_t foobaz() {
vec.push_back(1);
return vec[0];
}

double math_fn(double val) {
return sin(val);
}
1 change: 1 addition & 0 deletions test/arm-none-linux-gnueabihf/library.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
uint16_t baz(uint8_t var);
uint32_t foo(void);
uint16_t foobaz();
double math_fn(double val);
3 changes: 3 additions & 0 deletions test/arm-none-linux-gnueabihf/main.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
// The simplest possible main function
#include "library.h"
#include <iostream>

int main(){
std::cout << math_fn(10) << "\n";
return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,12 @@ relative to the library search directories.
OUTPUT_FORMAT(elf64-littleaarch64)
-GROUP ( /lib64/libc.so.6 /usr/lib64/libc_nonshared.a AS_NEEDED ( /lib/ld-linux-aarch64.so.1 ) )
+GROUP ( =/lib64/libc.so.6 =/usr/lib64/libc_nonshared.a AS_NEEDED ( =/lib/ld-linux-aarch64.so.1 ) )

--- a/aarch64-none-linux-gnu/libc/usr/lib64/libm.so
+++ b/aarch64-none-linux-gnu/libc/usr/lib64/libm.so
@@ -1,4 +1,4 @@
/* GNU ld script
*/
OUTPUT_FORMAT(elf64-littleaarch64)
-GROUP ( /lib64/libm.so.6 AS_NEEDED ( /lib64/libmvec.so.1 ) )
+GROUP ( =/lib64/libm.so.6 AS_NEEDED ( =/lib64/libmvec.so.1 ) )
Loading