Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-05-19ARM/AArch64: Fix GetCmdLine semihosting directivesnewlib-snapshot-20170519Laurent ALFONSI
When simulating arm code, the target program startup code (crt0) uses semihosting invocations to get the command line from the simulator. The simulator returns the command line and its size into the area passed in parameter. (ARM 32-bit specifications : http://infocenter.arm.com/help/topic/com.arm.doc.dui0058d/DUI0058.pdf chapter "5.4.19 SYS_GET_CMDLINE"). The memory area pointed by the semihosting register argument is located in .text section (usually not writtable (RX)). If we run this code on a simulator that respects this rights properties (qemu user-mode for instance), the command line will not be written to the .text program memory, in particular the length of the string. The program runs with an empty command line. This problem hasn't been seen earlier probably because qemu user-mode is not so much used, but this can happen with another simulator that refuse to write in a read-only segment. With this modification, the command line can be correctly passed to the target program. Changes: - libgloss/arm/crt0.S : Arguments passed to the AngelSWI_Reason_GetCmdLine semihosting invocation are placed into .data section instead of .text - libgloss/aarch64/crt0.S : Idem for aarch64 AngelSVC_Reason_GetCmdLine semihosting.
2017-04-19Fix relocation type for _bsssize being R_MSP430X_ABS16 when large memory ↵Jozef Lawrynowicz
model is used
2017-04-18libgloss/arm: fix discovery of "eabihf" toolchainsCarlos Santos
ARM EABI toolchains can optionally use the "hf" suffix to identify hardware floating point support. Use the "*-*-eabi*" pattern to match these toolchains. Original patch by Bryan Hundven for the Crosstool-NG project. Improved by Alexey Neyman. Signed-off-by: Carlos Santos <casantos@datacom.ind.br> CC: Bryan Hundven <bryanhundven@gmail.com CC: Alexey Neyman <stilor@att.net>
2017-02-15Fix elf-nano.specs to work without -save-tempsThomas Preud'homme
The changes in af272aca591fe1dc0f1be64ae5bda147ea98a047 only works when using gcc/g++ with -E or -save-temps, otherwise newlib's newlib.h gets used even if -specs=nano.specs is specified. This is because the driver only use cpp_options spec for the external cpp tool, not for the integrated one. This patch uses instead cpp_unique_options which is used in all cases: it is used directly when the integrated preprocessor is used, and indirectly by expansion of cpp_options otherwise.
2017-02-13Fix cpp invocation for C++ in nano specThomas Preudhomme
Hi, The changes in c028685518a261f6d0dab0d7ed15f9570ab9b3d0 to use newlib-nano's include directory work for cc1 but not cc1plus. cc1plus comes with its own cpp spec which does not have a name attached to it. This patch uses the renaming trick on cpp_options instead of cpp, as cpp_options is used both by cc1 and cc1plus.
2017-02-13libgloss: Remove duplicate definition of environStafford Horne
Environ is defined in libgloss and libc: - libgloss/or1k/syscalls.c - libc/stdlib/environ.c When linking we sometimes get errors: or1k-elf-g++ test.o -mnewlib -mboard=or1ksim -lm -o test /opt/shorne/software/or1k/lib/gcc/or1k-elf/5.3.0/../../../../or1k-elf/lib/libor1k.a(syscalls.o):(.data+0x0): multiple definition of `environ' /opt/shorne/software/or1k/lib/gcc/or1k-elf/5.3.0/../../../../or1k-elf/lib/libc.a(lib_a-environ.o):(.data+0x0): first defined here collect2: error: ld returned 1 exit status This doesnt happen after the fix. Basic things build fine too.
2017-02-13libgloss: or1k: If available call the init for init_arrayStafford Horne
There was an issue revealed in gdb testing where C++ virtual tables were not getting properly initialized. This seems to be due to the c++ global constructors moving from ctors to init_array. This fix makes sure we call the proper method for initializing the constructors in all places.
2017-02-13or1k: Make open reentrantOlof Kindgren
or1k uses reentrant calls by default, but there was no open_r defined which caused failure in C++/C code such as: int main() { std::cout << "test\n"; return 0; } or int main() {open(".", 0);}
2017-01-29Committed, libgloss: hook up cris-elf to the initfini-array support.Hans-Peter Nilsson
After a binutils change "a while ago" (2015-12) to default to --enable-initfini-array, i.e. to merge .ctors and .dtors into .init_array and .fini_array, this is needed for cdtors to run at all. Based on what goes on in arm/ and aarch64/. Tested for cris-elf by running the gcc testsuite. By the way, the configure test doesn't detect this change, so the HAVE_INITFINI_ARRAY ifdeffery is somewhat redundant. Still, the change is tested to be safe with older binutils too. libgloss/ * cris/crt0.S, cris/lcrt0.c: Include newlib.h. [HAVE_INITFINI_ARRAY] (_init): Define to __libc_init_array. [HAVE_INITFINI_ARRAY] (_fini): Ditto __libc_fini_array.
2016-08-19Fix html build with makeinfo 5.2Thomas Preudhomme
HTML build fails with makeinfo 5.2 with the following error: libgloss/doc/porting.texi:73: @menu seen before first @node libgloss/doc/porting.texi:73: perhaps your @top node should be wrapped in @ifnottex rather than @ifinfo? Following the advice indeed solve the issue while still allowing pdf, dvi and info builds to work.
2016-08-11arc: Add align keyword.Claudiu Zissulescu
libgloss/ 2016-06-28 Claudiu Zissulescu <claziss@synopsys.com> * arc/crt0.S: Add align keyword.
2016-05-26Add comment in the v850's crt0.S file noting that separate LMA and VMA ↵newlib-snapshot-20160527Nick Clifton
addresses for data sections are not currently supported.
2016-05-25arc: Have nops in _exit_halt only for ARCompactAnton Kolesov
ARCompact processors (ARC 600 and ARC 700) require three "nop"s after the "flag 1" instruction. Later ARC processors do not have this requirement, so it is possible to reduce size of "_exit_halt" for them. libgloss/ 2016-05-24 Anton Kolesov <Anton.Kolesov@synopsys.com> * arc/crt0.S (_exit_halt): Insert nops only for ARCompact.
2016-05-25arc: Rework default exception handlers for ARC EM and HSAnton Kolesov
Initially crt0.S used a special function, declared as weak as a default exception handler in interrupt vector table. To let user override individual handlers, this function had multiple names - one for each IVT entry, which, however, was terribly confusing for the debugger and user - because it wasn't clear which symbol will be used as a function name in debugger. Defining multiple separate functions - one for each handler, would resolve the mess, but would increase code size of crt0.o. To clean this up, this patch defines exception handlers as weak symbols as well, but those are defined as just symbols, not functions, hence there would be less confusion over what is what. At the same time, users still can redefine exception handlers symbol by creating functions with respective names. libgloss/ 2016-05-24 Anton Kolesov <Anton.Kolesov@synopsys.com> * arc/crt0.S: Convert memory_error and friends to non-function symbols.
2016-05-20libgloss/ft32: fix whitespace in MakefileYaakov Selkowitz
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2016-05-11Fix libgloss arc nsim specs file.Jeff Johnston
2016-05-06Fix libgloss/arc/nano.specs file.Jeff Johnston
2016-05-05Fix white-space in libgloss/arc/Makefile.in.Jeff Johnston
2016-05-02Fix support ARC processors without barrel-shifterJeff Johnston
crt0.S for ARC used to use instruction "asr.f lp_count, r3, 2" for all cores except ARC601. However instructions which shift more than 1 bit are optional, so this crt0.S didn't worked for all ARC cores. Luckily this is a shift just by 2 bits on all occassions, so fix is trivial - use two single-bit shifts. libgloss/ChangeLog 2016-04-29 Anton Kolesov <anton.kolesov@synopsys.com> * arc/crt0.S: Fix support for processors without barrel-shifter. Signed-off-by: Anton Kolesov <Anton.Kolesov@synopsys.com>
2016-05-02Update crt0.S for ARC.Jeff Johnston
This is similar to commit 06537f05d4b6a0d2db01c6afda1d2a0ea2588126 to the newlib for ARC. GCC for ARC has been updated to provide consistent naming of preprocessor definitions for different optional architecture features: * __ARC_BARREL_SHIFTER__ instead of __Xbarrel_shifter for -mbarrel-shifter * __ARCEM__ instead of __EM__ for ARC EM cores * __ARCHS__ instead of __HS__ for ARC HS cores * etc (not used in libgloss) This patch updates crt0.S for ARC to use new definitions instead of a deprecated ones. To ensure compatibility with older compiler new definitions are also defined in crt0.S if needed, based on presence of deprecated preprocessor definitions. libgloss/ChangeLog 2016-04-29 Anton Kolesov <Anton.Kolesov@synopsys.com> * arc/crt0.S: Use new GCC defines to detect processor features.
2016-04-29Add necessary infrastructure to support "nano" build of newlib.Jeff Johnston
ARC aproach to this feature is similiar to ARM's one here. 2016-04-29 Anton Kolesov <anton.kolesov@synopsys.com> * arc/nano.specs: New file. * arc/Makefile.in: Support nano.specs. * arc/nsim.specs: Likewise.
2016-04-21Fixed semihosting for ARM when heapinfo not provided by debugger.David Hoover
2016-04-07Fix typo in the name of the MSP430 attribute section of example MSP430 ↵Nick Clifton
linker scripts.
2016-03-26Initializing TTBR0 to inner/outer WBJiong Wang
While running tests on internal systems, we identified an issue in the startup code for newlib on AArch32 systems with Multiprocessor Extensions to the architecture. The issue is we were configuring page table flags to be Inner cacheable/Outer non-cacheable, while for at least architectures with Multiprocessor Extension, we'd configure it to Inner/Outer write-back, no write-allocate, and cacheable. The attached patch fixes this, and no regression on arm-none-eabi bare-metal tests. Adopted suggestion given by Richard offline to avoid using jump. libgloss/ * arm/cpu-init/rdimon-aem.S: Set TTBR0 to inner/outer cacheable WB, and no allocate on WB for arch with multiprocessor extension.
2016-03-13or1k: properly restore timerStefan Roesch
Consider the function parameter for restoring the timer
2016-03-13or1k: Fix multicore stack calculationStefan Roesch
Change the type of the stack pointers to enable pointer calculations at byte granularity, which is needed for the calculation of _or1k_stack_core[c] and _or1k_exception_stack_core[c] with _or1k_stack_size and _or1k_exception_stack_size. (util.c:53-54)
2016-03-10Remove bogus LONG(0) directives from MSP430 linker scripts.Nick Clifton
2016-02-09Seperate MSP430 cio syscalls into individual function sections.Nick Clifton
START_FUNC: New macro. END_FUNC: New macro. exit, isatty, getpid, sc2: Use the new macros.
2016-01-28Make macro checks ARMv8-M baseline proofThomas Preud'homme
libgloss: * arm/Makefile.in: Add newlib/libc/machine/arm to the include path if newlib is present. * arm/arm.h: Include acle-compat.h. (THUMB_V7_V6M): Rename to ... (PREFER_THUMB): This. Use ACLE macros __ARM_ARCH_ISA_ARM instead of __ARM_ARCH_6M__ to decide whether to define it. (THUMB1_ONLY): Define for Thumb-1 only targets. (THUMB_V7M_V6M): Rename to ... (THUMB_VXM): This. Defined based on __ARM_ARCH_ISA_ARM, excluding ARMv7. * arm/crt0.S: Use THUMB1_ONLY rather than __ARM_ARCH_6M__, !__ARM_ARCH_ISA_ARM rather than THUMB_V7M_V6M for fp enabling, and PREFER_THUMB rather than THUMB_V7_V6M. Rename other occurences of THUMB_V7M_V6M to THUMB_VXM. * arm/linux-crt0.c: Likewise. * arm/redboot-crt0.S: Likewise. * arm/swi.h: Likewise. * arm/trap.S: Likewise. newlib: * libc/machine/arm/memcpy-stub.c: Use ACLE macros __ARM_ARCH_ISA_THUMB and __ARM_ARCH_ISA_ARM to check for Thumb-2 only targets rather than __ARM_ARCH and __ARM_ARCH_PROFILE. * libc/machine/arm/memcpy.S: Likewise. * libc/machine/arm/setjmp.S: Likewise for Thumb-1 only target and include acle-compat.h. * libc/machine/arm/strcmp.S: Likewise for Thumb-1 and Thumb-2 only target and include acle-compat.h. * libc/sys/arm/arm.h: Include acle-compat.h. (THUMB_V7_V6M): Rename to ... (PREFER_THUMB): This. Use ACLE macro __ARM_ARCH_ISA_ARM instead of __ARM_ARCH_6M__ to decide whether to define it. (THUMB1_ONLY): Define for Thumb-1 only targets. (THUMB_V7M_V6M): Rename to ... (THUMB_VXM): This. Defined based on __ARM_ARCH_ISA_ARM, excluding ARMv7. * libc/sys/arm/crt0.S: Use PREFER_THUMB rather than THUMB_V7_V6M and rename THUMB_V7M_V6M into THUMB_VXM. * libc/sys/arm/swi.h: Likewise.
2016-01-28Deprecate newlib and winsup ChangeLog filesCorinna Vinschen
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-12-18Build msp430-specific libnosysDJ Delorie
The MSP430 debuggers support I/O on hardware through CIO, so we can use a CIO-enabled library as the "nosys" library (in addition to the libsim library, which talks to our simulator) * configure.in: Don't build default libnosys for msp430 * configure: Regenerate. * msp430/Makefile: Rename libcio to libnosys.
2015-12-18Update CIO hooks to be more flexible.DJ Delorie
Replace the one hook we had with two to avoid underscore issues. * msp430/cio.c: Remove, replace with... * msp430/cio.S: New, this.
2015-12-16rl78: Don't output CR when LF is encountered in write().Kevin Buettner
The file libgloss/rl78/write.c currently contains code which outputs \r when \n is seen. The code will then output the \n as well. This patch removes the bit of code that tests for \n and then outputs \r. I made this change to fix some failures in gdb.base/call-ar-st.exp. In that test, I see two carriage returns followed by a newline. One CR is output by the libgloss code. The other is output by the terminal driver. The total list of failures fixed (using the default rl78 multilib) are: FAIL: gdb.base/call-ar-st.exp: print print_double_array(double_array) (timeout) FAIL: gdb.base/call-ar-st.exp: print print_char_array(char_array) (timeout) FAIL: gdb.base/call-ar-st.exp: continue to tbreak2 (timeout) FAIL: gdb.base/call-ar-st.exp: continuing to tbreak3 (timeout) FAIL: gdb.base/call-ar-st.exp: print print_double_array(array_d) (timeout) FAIL: gdb.base/call-ar-st.exp: continuing to tbreak4 (timeout) FAIL: gdb.base/call-ar-st.exp: print sum_array_print(10, *list1, *list2, *list3, *list4) (timeout) FAIL: gdb.base/call-ar-st.exp: print print_small_structs (timeout) FAIL: gdb.base/call-ar-st.exp: print print_ten_doubles(123.456, 123.456, -0.12, -1.23, 343434.8, 89.098, 3.14, -5678.12345, -0.11111111, 216.97065) (timeout) FAIL: gdb.base/call-ar-st.exp: print print_small_structs from print_long_arg_list (timeout) FAIL: gdb.base/call-ar-st.exp: print print_struct_rep(*struct1, *struct2, *struct3) (timeout) FAIL: gdb.base/dprintf.exp: call: printf: 1st dprintf (timeout) FAIL: gdb.base/dprintf.exp: call: printf: 2nd dprintf (timeout) FAIL: gdb.base/interrupt.exp: process is alive (the program exited) There are no regressions. libgloss/ChangeLog: * rl78/write.c (_write): Don't output CR when LF is encountered.
2015-12-04Always define __high_bsssize, do not just PROVIDE it.Nick Clifton
* msp430/msp430xl-sim.ld (__high_bsssize): Define.
2015-11-23Fix initialisation of .upper.bss for the MSP430.Nick Clifton
* msp430/msp430xl-sim.ld (__high_bsssize): Define.
2015-11-12Add support for ARC to libglossAnton Kolesov
ChangeLog: 2015-11-12 Anton Kolesov <Anton.Kolesov@synopsys.com> * configure.in: Add ARC support to libgloss. * configure: Regenerate. libgloss/ChangeLog: 2015-11-12 Anton Kolesov <Anton.Kolesov@synopsys.com> * configure: Add ARC support. * configure.in: Likewise. * arc/Makefile.in: Likewise. * arc/aclocal.m4: Likewise. * arc/configure: Likewise. * arc/configure.in: Likewise. * arc/crt0.S: Likewise. * arc/libcfunc.c: Likewise. * arc/nsim-syscall.h: Likewise. * arc/nsim-syscalls.c: Likewise. * arc/nsim.specs: Likewise. * arc/sbrk.c: Likewise.
2015-10-21* rl78/crt0.S (_start): Fixed code that clears .bssDJ Delorie
2015-10-06Add support for persistent data to the MSP430 linker scripts.Nick Clifton
* msp430/msp430-sim.ld: Add .persistent section. Tidy up section layout. Start RAM above hardware multiply registers. * msp430/msp430xl-sim.ld: Likewise.
2015-09-04Add support for FT32 platform.Jeff Johnston
2015-08-24oops - forgot to add PR number to ChangeLog entry.Nick Clifton
2015-08-20 * msp430/crt0.S: Remove watchdog disabling code.Nick Clifton
2015-08-07or1k: Typo fixesJeff Johnston
Wrong paranthesis and an incorrect symbol name are fixed. * or1k/boards/optimsoc.S: Fix symbol name * or1k/crt0.S: Remove paranthesis
2015-08-07or1k: Allow exception nestingJeff Johnston
Allow exceptions to be nested, which is especially useful with urgent interrupts while processing an exception. The implementation counts up the nesting level with each call to an exception. In the outer exception (level 1), the exception stack is started. All nested exceptions just reserve the redzone (scratch memory that may be used by compiler) and exception context on the stack, but then process on the same scratch. Restriction: Impure pointers are shared among all exceptions. This may be solved by creating an impure data structure in the stack frame with each nested exception. * or1k/crt0.S: Add exception nesting * or1k/exceptions-asm.S: ditto * or1k/util.c: ditto
2015-08-07or1k: Make heap end globally visibleJeff Johnston
Boards may change the initial value from _end to another value. * or1k/sbrk.c: Make heap end globally visible
2015-08-04This is part of a larger fix for RL78 complex relocs - they need an absolute ↵Nick Clifton
symbol at address 0 that is not part of the *ABS* section. * rl78/rl78-sim.ld: Provide a value for __rl78_abs__. * rl78/rl78.ld: Likewise.
2015-07-14Change to nano.specs to add nano's include dircygwin-2_1_0-releaseAndre Simoes Dias Vieira
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-05-27or1k: Add missing initialization of impure ptrJeff Johnston
* or1k/impure.c: Fix initialization of impure ptr
2015-05-27or1k: set heap start for optimsoc-gzllJeff Johnston
- With the gzll kernel we have two different loading options: - If the image is loaded to the global memory, the bootstrapping loads the kernel to local memory. Applications are loaded on demand. The heap then starts right after bss. - If the image is pre-loaded to the local memory it includes the application binaries right after bss. The heap then starts after the application objects. - We can check if this is a gzll kernel as it has the string "gzll" at 0x2000. At 0x200c we then find the end of the application objects in the image. If there is no global memory we set _or1k_heap_start to this value. * or1k/boards/optimsoc.S: Heap for gzll kernel
2015-05-27or1k: Make heap start configurableJeff Johnston
- Previously the heap started right after the bss section. This can now be configured by changing the _or1k_heap_start symbol that defaults to the old value (&end). In board_init_early, we can now set this to another value. * or1k/sbrk.c: Allow for different heap start
2015-05-27or1k: UART also accept timeout interruptJeff Johnston
- The UART interrupt only handled receiver FIFO full interrupts, but we also want to handle timeout interrupts. * or1k/or1k_uart.c: Fix interrupts