This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Richard,
I'm not very keen on keeping the sys/arm stuff in newlib. Is it possible to start changing gcc to use libgloss by default? Regarding your patch, is there a corresponding change required for libgloss/arm?
-- Jeff J.
On 11/25/2011 10:33 AM, Richard Earnshaw wrote:On 24/11/11 15:31, Richard Earnshaw wrote:
And the reason I'm not seeing this is because my copy of newlib is out of date :-(
Hold on...
R.
So it turns out that Thomas' patch is substantially correct, but it's not all that is needed. To get the build attributes correct we also need to force the assembler to behave when building thumb1 code. The attached patch merges Thomas' changes plus some of my own to ensure that this is done (and also fixes up a case where SWI was being incorrectly generated for an M-class core)
R.
<date> Richard Earnshaw<rearnsha@arm.com> Thomas Klein<th.r.klein@web.de>
* sys/arm/crt0.S: Manually set the target architecture when compiling for Thumb1 on EABI targets. Don't use SWI on M-profile cores. Avoid v6-only Thumb-1 MOV instruction.
Repeating previous patch for both crt0 files with minor modifications. Removing the following line to reduce the amount of changes.
- mov r7, a2 /* Null frame pointer for Thumb. */ + movs r7, a2 /* Null frame pointer for Thumb. */
+#ifdef THUMB_V7M_V6M + bkpt AngelSWI +#else AngelSWIAsm AngelSWI +#endif
due to different content of file swi.h. But they should be present in newlib.
Regards Thomas
ChangeLog newlib: <date> Richard Earnshaw<rearnsha@arm.com> Thomas Klein<th.r.klein@web.de>
* libc/sys/arm/crt0.S: Manually set the target architecture when compiling for Thumb1 on EABI targets. Don't use SWI on M-profile cores. Avoid v6-only Thumb-1 MOV instruction.
ChangeLog libgloss: <date> Richard Earnshaw<rearnsha@arm.com> Thomas Klein<th.r.klein@web.de>
* arm/crt0.S: Manually set the target architecture when compiling for Thumb1 on EABI targets. Avoid v6-only Thumb-1 MOV instruction.
Attachment:
diff.newlib
Description: Text document
Attachment:
diff.libgloss
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |