Skip to content

Conversation

@ruanzhengwang
Copy link

Add config.mk.cross to support cross-compiling. To use, copy
include/mk/config.mk.cross to include/mk/config.mk

Signed-off-by: Zhengwang Ruan rzw@meizu.com

Add config.mk.cross to support cross-compiling. To use, copy
include/mk/config.mk.cross to include/mk/config.mk

Signed-off-by: Zhengwang Ruan <rzw@meizu.com>
@ruanzhengwang
Copy link
Author

This config enables using CROSS_COMPILE variable and extra LDFLAGS, so to simplify the configuring work of cross-compiling for embeded devices.

@vapier
Copy link
Member

vapier commented Jul 31, 2014

sorry, but i don't see a need for this. why exactly can't you just run configure ? it already supports all the cross-compiling logic for free.

what might be acceptable is updating the existing .default file by just adding $(CROSS_COMPILE) prefixes to the existing vars. but adding a whole new file makes no sense.

@ruanzhengwang
Copy link
Author

But LDFLAGS also needs to be specified clearly as '-static -pthread', otherwise the compiled tests could not be executed on targets.

CROSS_COMPILE is a well known symbol for cross-compiling, so add it to simplify
compiling for embeded systems.

Signed-off-by: Zhengwang Ruan <rzw@meizu.com>
@vapier
Copy link
Member

vapier commented Jul 31, 2014

uhh, no, that is not true at all. i've never needed static linking, nor had to manually force linking with pthreads. this sounds more like your setup is broken.

if you can run configure and show that some tests are missing pthread linkage, file an issue for us to look into.

@ruanzhengwang ruanzhengwang deleted the master branch August 1, 2014 02:06
jstancek added a commit that referenced this pull request May 22, 2017
Only newlib testcases support SAFE macros in cleanup().
When SAFE_UNLINK fails, it creates infinite loop between
tst_brk_ and cleanup:

 #0  tst_res__ at tst_res.c:153
 #1  0x0000000000407ba8 in tst_brk__ at tst_res.c:480
 #2  0x00000000004081fe in tst_brkm_ at tst_res.c:577
 #3  0x000000000040a7c9 in safe_unlink at safe_macros.c:358
 #4  0x0000000000404abd in cleanup () at pipeio.c:497
 #5  0x0000000000407bc7 in tst_brk__ at tst_res.c:498
 #6  0x00000000004081fe in tst_brkm_ at tst_res.c:577
 #7  0x000000000040c1d6 in def_handler at tst_sig.c:231
 #8  <signal handler called>
 #9  0x00007f29c2cbd1f7 in __GI_raise at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
 #10 0x00007f29c2cbe8e8 in __GI_abort () at abort.c:90
 #11 0x00000000004081af in tst_brkm_ at tst_res.c:581
 #12 0x000000000040a7c9 in safe_unlink at safe_macros.c:358
 #13 0x0000000000404abd in cleanup () at pipeio.c:497
 #14 0x0000000000407bc7 in tst_brk__ at tst_res.c:498
 #15 0x00000000004081fe in tst_brkm_ at tst_res.c:577
 #16 0x000000000040c1d6 in def_handler at tst_sig.c:231
 #17 <signal handler called>
 #18 0x00007f29c2cbd1f7 in __GI_raise at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
 #19 0x00007f29c2cbe8e8 in __GI_abort () at abort.c:90
 #20 0x00000000004081af in tst_brkm_ at tst_res.c:581
 #21 0x000000000040a7c9 in safe_unlink at safe_macros.c:358
 #22 0x0000000000404abd in cleanup () at pipeio.c:497
 ...

Signed-off-by: Jan Stancek <jstancek@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants