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
2024-01-20libgloss: merge msp430 into top-level MakefileMike Frysinger
Avoid a recursive make to speed things up a bit. A msp430-elf build shows installed objects & libs produce same code.
2024-01-20libgloss: msp430: delete custom .S.o ruleMike Frysinger
This was added to specify -Wa,-gdwarf2 when compiling the assembly files. Considering the size of these .S files, it seems unnecessary overkill and complicates the build system. All but one of these compile down to 6 or fewer lines, and those hardly need extra debug for anyone who is poking msp430 assembly. The 1 file that is larger than that (crt_move_highdata.S) is still <15 insns. This will also simplify merging it into the top-level Makefile.
2024-01-20libgloss: msp430: split up crt0.S sourceMike Frysinger
The build system compiles crt0.S many times to produce independent object files by defining different -DLxxx symbols for each. This complicates the build, and has led to some bugs in the source and build (see the previous cleanup commits in here). The crt_bss.S file has also been duplicated with crt0.S leading to confusion as to which one is the "real" one. The only reason to keep them in one file is to make management of the section numbers when calling START_CRT_FUNC a little easier, but that seems trivial to check with a quick grep across all the files. Considering how complicated the build is now, and the bugs we've had as a result, split the crt0.S file up into multiple source files so we don't have to compile it multiple times. This will also simplify merging it into the top-level Makefile.
2024-01-20libgloss: msp430: delete stub crt_init.oMike Frysinger
This object is created by compiling crt0.S with -DLinit, but there has never been an "#if Linit" check in crt0.S, so this has always produced a stub object file. Drop compiling it entirely.
2024-01-20libgloss: msp430: delete outdated/wrong codeMike Frysinger
The #if 0 & comment imply this code doesn't exist and is never used, except there's another #if Lrun_fini_array section below which *does* define this function, which makes this code comment confusing. This seems to be a hold over of the cleanup of the minrt code in the old commit 884b05b54e4595433c85f8ca9820e88b4c723e38 ("MSP430: Remove .init/.fini sections").
2022-01-26libgloss: merge stub arch configure scripts up a levelMike Frysinger
For about half the ports, we don't need a subdir configure script. They're using the config/default.m[ht] rules, and they aren't doing any unique configure tests, so they exist just to pass top-level settings down to create the arch Makefile. We can just as easily do that from the top-level Mkaefile directly and skip configure. Most of the remaining configure scripts could be migrated up to the top-level too, but that would require care in each subdir. So let's be lazy and put that off to another day.
2022-01-17libgloss: clean up redundant shared lib warningsMike Frysinger
Use standard AC_MSG_WARN macro in the top-level configure, and delete the message from all the subdirs. There's no need to issue this more than once per libgloss build.
2022-01-14require autoconf-2.69 exactlyMike Frysinger
The newlib & libgloss dirs are already generated using autoconf-2.69. To avoid merging new code and/or accidental regeneration using diff versions, leverage config/override.m4 to pin to 2.69 exactly. This matches what gcc/binutils/gdb are already doing. The README file already says to use autoconf-2.69. To accomplish this, it's just as simple as adding -I flags to the top-level config/ dir when running aclocal. This is because the override.m4 file overrides AC_INIT to first require the specific autoconf version before calling the real AC_INIT.
2022-01-11libgloss: hardcode AC_CONFIG_AUX_DIR pathMike Frysinger
In order to transition to automake, we have to use hardcoded paths in the AC_CONFIG_AUX_DIR macro call (since automake evaluates the path itself, and doesn't expand vars), so simplify all the calls here.
2021-11-06libgloss: regenerate aclocal.m4 & configure w/newer versionsMike Frysinger
Regenerate the files using automake-1.15 & autoconf-2.69 to match the binutils/gdb/gcc projects. Ran: libgloss $ find -name configure.ac -printf '%h\n' | while read d; do (cd $d; export WANT_AUTOCONF=2.69 WANT_AUTOMAKE=1.15; aclocal-1.15 -I.. && autoconf-2.69); done
2021-09-15libgloss: add missing aclocal.m4 filesMike Frysinger
These subdirs were missing aclocal.m4 files pulling in macros from ../acinclude.m4 which caused some macros to not be expanded. For example, autoconf complains: configure.ac:25: error: possibly undefined macro: LIB_AC_PROG_CC If this token and others are legitimate, please use m4_pattern_allow. See the Autoconf documentation. These were generated with aclocal-1.9 as that seems to be what was used in these dirs previously, and with whatever version of autoconf the specific subdir was using. This should minimize diffs.
2021-09-13libgloss/newlib: rename configure.in to configure.acMike Frysinger
The .in name has been deprecated for a long time in favor of .ac.
2020-09-04MSP430: Fix calculation of string length in sbrk.cJozef Lawrynowicz
2020-09-03MSP430: Fix message in sbrk.c printing binary characterJozef Lawrynowicz
The call to write() in sbrk.c was using the wrong value for the length argument, causing the NUL terminating character of the string to be printed.
2020-09-03Fix warnings when building for msp430-elfJozef Lawrynowicz
The MSP430 target supports both 16-bit and 20-bit size_t and intptr_t. Some implicit casts in Newlib expect these types to be "long", (a 32-bit type on MSP430) which causes warnings during compilation such as: "cast from pointer to integer of different size"
2020-08-07MSP430: Increase the amount of main memory available in sim ld scriptsJozef Lawrynowicz
The main memory region of the GDB simulator ends at address 0xFFBF, but the simulator linker scripts do not make full use of this available memory. >From 61f3d212741acee583e21ff2c2808775584ecad6 Mon Sep 17 00:00:00 2001 From: Jozef Lawrynowicz <jozef.l@mittosystems.com> Date: Mon, 3 Aug 2020 19:38:23 +0100 Subject: [PATCH 2/2] MSP430: Increase the amount of main memory available in sim ld scripts The main memory region of the GDB simulator ends at address 0xFFBF, but the simulator linker scripts do not make full use of this available memory.
2020-08-07MSP430: Word align __*_array_start symbols in sim linker scriptsJozef Lawrynowicz
__{preinit,init,fini}_array_start symbols must be word aligned in linker scripts. If the section preceding the __*_array_start symbol has an odd size, then a NULL byte will be present between the start symbol and the .*_array section itself, when the section gets automatically word-aligned. This results in a branch to an invalid address when the CRT startup code tries to run through the functions listed in the array sections. >From de115144d05ecbaa82c9c737cc261715ca4b7d67 Mon Sep 17 00:00:00 2001 From: Jozef Lawrynowicz <jozef.l@mittosystems.com> Date: Mon, 3 Aug 2020 19:09:46 +0100 Subject: [PATCH 1/2] MSP430: Word align __*_array_start symbols in sim linker scripts __{preinit,init,fini}_array_start symbols must be word aligned in linker scripts. If the section preceding the __*_array_start symbol has an odd size, then a NULL byte will be present between the start symbol and the .*_array section itself, when the section gets automatically word-aligned. This results in a branch to an invalid address when the CRT startup code tries to run through the functions listed in the array sections.
2019-10-25MSP430: Add missing build rule for unlink() to libgloss MakefileJozef Lawrynowicz
2019-07-24MSP430: Remove .init/.fini sectionsJozef Lawrynowicz
The .init/.fini sections are not required for msp430-elf, and add unnecessary code bloat to the CRT library. These sections are specified as "unused" by the MSP430 EABI. .init existed to call __crt0_run_{init,preinit}_array which run through the functions in .{init,preinit}_array. __crt0_run_{init,preinit}_array are already dynamically included like the other crt0 functions, so these can be placed before the call to main, which ensures they are still called if needed. With these functions moved, .init has no purpose and can be removed. .fini existed to call __crt0_run_fini_array. However, the "__msp430_fini" symbol which marks the start of .fini has never been used, so no termination routines have ever been run for msp430. On returning from main(), _exit() is called which just loops forever. So there is no current expectation that __crt0_run_fini_array will get called by the CRT code. Further work is to ensure functions registered with atexit can be optionally called during program termination, and then __crt0_run_fini_array can be registered with atexit during program initialization. The mechanisms for supporting the "-minrt" option have also been removed. "-minrt" enabled a "minimum runtime environment" by removing calls to functions which run global static initializers and constructors. Since this behaviour is now dynamic, and these functions are only included when needed, the minrt versions of the CRT object files are no longer required.
2019-04-18MSP430: Make the inclusion of run_*_array fns depend on defined assembler ↵Jozef Lawrynowicz
symbols Many of the MSP430 crt functions (e.g. to initialize bss) are linked "dynamically", based on symbols defined in the program. The GNU assembler defines the symbols corresponding to the crt functions by examining the section names in the input file. If GCC has been configured with --enable-initfini-array, then .init_array and .fini_array will hold pointers to global constructors/destructors. These sections can also hold functions that need to be executed for other purposes. The attached patch puts the __crt0_run_{preinit,init,fini}_array and __crt0_run_array functions in their own object files, so they will only be linked when needed. Successfully regtested the DejaGNU GCC testsuite using the binutils and newlib changes together with GCC trunk configured with --enable-initfini-array.
2019-04-16Fix incorrect assembly code in _msp430_run_arrayJozef Lawrynowicz
2019-04-15Fix definition of write() to use const char * for the type of the bufferJozef Lawrynowicz
2017-05-26Fix thinko in MSP430 libgloss implementation of write() system call.Martin Young
2017-04-19Fix relocation type for _bsssize being R_MSP430X_ABS16 when large memory ↵Jozef Lawrynowicz
model is used
2016-04-07Fix typo in the name of the MSP430 attribute section of example MSP430 ↵Nick Clifton
linker scripts.
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.
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-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-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-08-20 * msp430/crt0.S: Remove watchdog disabling code.Nick Clifton
2015-05-27Add a check that the data area does not overrun the stack.Nick Clifton
* msp430/msp430-sim.ld (.stack): Add an assertion to make sure that the data area does not overrun the stack. PROVIDE a new symbol __stack_size to allow the user to set the limit. * msp430/msp430xl-sim.ld (.stack): Likewise. * rl78/rl78-sim.ld (.stack): Likewise. * rl78/rl78.ld (.stack): Likewise. * rx/rx-sim.ld (.stack): Likewise. * rx/rx.ld (.stack): Likewise.
2015-05-27Adds support for placing MSP430 code and data into either low memory or high ↵Nick Clifton
memory. * msp430/msp430.ld: Delete. * msp430/msp430F5438A-l.ld: Delete. * msp430/msp430F5438A-s.ld: Delete. * msp430/crt_movedata.S: Delete. * msp430/Makefile.in (SCRIPTS): Remove msp430.ld. (CRT_OBJS): Add crt_move_highdata.o. * msp430/memmodel.h (START_CRT_FUNC): New macro. (END_CRT_FUNC): New macro. (WEAK_DEF): New macro. * msp430/crt0.S: Use new macros. (move_highdata): New code to initialise the .data section if it is held in high memory. * msp430/msp430-sim.ld (.data): Add .either.data. (.rodata2): Move some read-only data sections here. (.text): Add .either.text. (.rodata): Add .either.rodata. (.bss): Add .either.bss. * msp430/msp430xl-sim.ld (MEMORY): Add HIROM. (.rodata2): Move some read-only data sections here. (.upper.data): New section. Include notes about how to initialise it.
2014-11-13 * msp430/Makefile.in (CRT_OBJS): Add crt_high_bss.o.Nick Clifton
* msp430/crt0.S (high_bss): Add. * msp430/msp430-sim.ld: Add error message if .upper sections are detected. * msp430/msp430xl-sim.ld (MEMORY): Adjust to better mimic real life MCUs. Add support for upper and lower sections.
2014-10-232014-10-22 Tim Harder <radhermit@gmail.com>DJ Delorie
* msp430/Makefile.in: respect DESTDIR during install
2014-09-22 * configure.in: Remove config_libnosys=falseNick Clifton
* configure: Regenerated. * msp430/nosyscalls.S: Rename to ciosyscalls.S * msp430/Makefile.in: Change LIBNOSYS to LIB_CIO.
2014-04-30 * msp430/Makefile.in (NOSYS_OBJS): Add unlink.o.Nick Clifton
(SCRIPTS): Remove msp430F5438A-s.ld and msp430F5438A-s.ld. * unlink.c: New file.
2014-01-30* msp430/Makefile.in (crt0-minrt.o, crtn-minrt.o): New. BuildDJ Delorie
from crt0.S with -DMINRT. (CRT_OBJS): Expand. (crt_%.o): New rule pattern. Build multiple objects from crt0.S. * msp430/crt0.S: Further break out functionality. Support -DMINRT that omits all init/fini logic. * msp430/crtn.S: Likewise. * msp430/msp430-sim.ld: Wildcard all .crt_* sections, sorted. * msp430/msp430.ld: Likewise. * msp430/msp430xl-sim.ld: Likewise.
2013-09-18 * msp430/Makefile.in (SCRIPTS): Add intr_vectors.ld.Nick Clifton
(LIB_CRT): New. (CRT_OBJS): New. (all): Add dependency upon LIB_CRT. (install): Likewise. * msp430/msp430-sim.ld: Include intr_vectors.ld. KEEP crt code, lowtext code and tm_clone_table. Separate the noinit section from the .bss section. Allow for extended .debug_line sections. * msp430/msp430.ld: Likewise. * msp430/msp430F5438A-l.ld: Likewise. * msp430/msp430F5438A-s.ld: Likewise. * msp430/msp430xl-sim.ld: Likewise . * msp430/crt_movedata.S: New. * msp430/crt_bss.S: New. * msp430/intr_vectors.ld: New.
2013-05-14[newlib]DJ Delorie
* configure.host (msp430): Add. * libc/include/machine/ieeefp.h: Add MSP430 support. * libc/include/machine/setjmp.h: Likewise. * libc/include/sys/config.h: Likewise. * libc/machine/configure.in (msp430): Add. * libc/machine/configure: Regenerate. * libc/machine/msp430: New directory. [libgloss] * configure.in (msp430*-*-elf): Add. * configure: Regenerate. * msp430: New directory.