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
2023-12-30libgloss: xtensa: fix crt0.o ruleMike Frysinger
Don't hardcode a custom rule for this -- reuse libobjs_a_SOURCES which was designed for this exact scenario.
2023-12-23Fix epiphany libgloss for c99/gcc-14Jeff Law
So in this case we mostly need to include an internal header (epiphany-syscalls.h). In a few cases an explicit prototype is added. We've also got a return with no value in a function with a non-void return type. Finally the asm_syscall interface expects a pointer as its first argument. In a few cases we've actually got an int (file descriptor) which we just cast to a void *. It's slightly more than Jeff J's pre-approval, but I think still reasonable.
2023-12-23Fix most of m32r libgloss for c99/gcc-14Jeff Law
Make implicit its explicit, add missing prototypes and header includes. This does not fix m32r-stub.c which needs more than the trivial work that Jeff J has pre-approved.
2023-12-23Fix mcore libgloss port for c99/gcc-14Jeff Law
Missing headers and prototypes, much like other ports.
2023-12-23Fix rl78 libgloss port for c99/gcc-14Jeff Law
Needed a prototype for SYS_write and the prototype for write was incorrect (returns an int, not a char *).
2023-12-23Fix c6x libgloss port for c99/gcc-14Jeff Law
Just one missing header in this case...
2023-12-23Fix ft32 libgloss for c99/gcc-14Jeff Law
Just one missing header for this libgloss port.
2023-12-23Fix frv libgloss bits for c99/gcc-14\Jeff Law
Same as we've seen elsewhere. Add missing prototype and header include.
2023-12-23Fix v850 libgloss for c99/gcc-14Jeff Law
So the prior patch for sysnecv850 was in newlib. This time we're fixing v850 bits in libgloss. Like other patches submitted recently, this converts implicit ints to explicit ints, adds a missing prototype and header includes.
2023-12-21Fix iq2000 libgloss for c99/gcc-14Jeff Law
Similar to the others in this space. Make implicit ints explicit ints. Add prototype for _write in sbrk.c.
2023-12-21Re: libgloss c99 fixes for mn10300-elfJeff Law
Very similar to other patches in this space. Avoid implicit int types and add missing #includes so that this code works with gcc-14.
2023-12-21Regenarate libgloss/Makefile.inJeff Johnston
2023-12-20libgloss: doc: generate single page & split html manualsMike Frysinger
By default, only split node html manuals are generated. Change the default to single page, and add an extra rule to also generate the split page manual.
2023-12-19libgloss: drop $(INCLUDES) when using $(AS)Mike Frysinger
Since $(AS) is the assembler, passing it a list of preprocessor include flags doesn't make much sense. The files aren't preprocessed which means `#include` lines aren't respected, and while it would affect `.include` usage, we never use that, and it's extremely unlikely to change. Plus, it's extremely unlikely we'd have .s files in common places to include vs contained entirely within a specific arch dir, and at that point, it can be included directly (with no flags), or the arch can add the unique set of include paths that it needs for itself.
2023-12-19Add generated files for Revert patchJeff Johnston
2023-12-19Revert "Fix libgloss/newlib build to conditionally use top include dir"Mike Frysinger
This reverts commit 17ac400c11bab30ac2c0bef12cbf7788f0b6f954. The build failures were due to incorrectly using $(INCLUDES) when running $(AS). Let's roll this back and drop $(INCLUDES) from the $(AS) invocations.
2023-12-19libgloss fix for bfin portJeff Law
gcc-14 will complain loudly both for calling a function without an in-scope prototype or when the in scope prototype differs from the known signature. "main" happens to be one of the functions the compiler knows about. So not only do we need to prototype it, we need to make sure the prototype matches what GCC thinks it should be. This fixes the bfin libgloss port to do the right thing for bfin-elf.
2023-12-17Re: Fix moxie libgloss issues with c99Jeff Law
Two libgloss issues specific to moxie-elf that show up build with GCC trunk. First, putnum.c uses "print" without a prototype. So I added one based on the function's definition in print.c. Second sim-inbyte.c uses read, which comes from unistd.h, so this adds a suitable #include.
2023-12-14Fix fr30 libgloss buildJeff Law
gcc-14 will default to c99 and as a result a fair amount of old code in newlib (particularly libgloss) is failing to build. I don't offhand know how many patches will be necessary to fix the various failures. I'll just pick them off one by one from my tree. This particular patch works around the return-mismatch problem syscalls.c for fr30. That file is a bit odd in that most functions are declared as returning an integer, but the implementations look like: > int > _read (file, ptr, len) > int file; > char * ptr; > int len; > { > asm ("ldi:8 %0, r0" :: "i" (SYS_read) : "r0"); > asm ("int #10"); > > return; > } Note the lack of a value on the "return" statement. The assumption is that the interrupt handler implementing syscalls will put the return value into the proper register, so falling off the end of the C function or returning with no value works in the expected way. It's not good code, but it probably works. Working from that assumption I decided to just use a pragma to disable the upgraded diagnostic from GCC -- essentially preserving existing behavior. This is the only fr30 specific issue that needs to be resolved and the only issue (so far) I've seen of this specific nature.
2023-12-06libgloss/cris: Make C declarations present and match themHans-Peter Nilsson
This is the libgloss part. Recently, there was a change in gcc such that implicit function declarations and type mismatches are now errors, no longer just warnings. Fix by adding and correcting declarations warned about; including the right header or adding a declaration (for "main" in lcrt0.c) and adjust to those types as necessary.
2023-12-04RISC-V: Fix -Wint-conversion warningKito Cheng
Upstream GCC has change this warning into error by default, so...we need to explicitly convert the type from pointer from/to integer, generally it's unsafe, but we know what we are doing here. However it's not safe for ilp32 on RV64, but we didn't support that yet, so I think this fix is good enough now :)
2023-11-29RISC-V: Fix timeval conversion in _gettimeofday()Kuan-Wei Chiu
Replace multiplication with division for microseconds calculation from nanoseconds in _gettimeofday function. Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com>
2023-09-19Bring back libsim.a for riscvAlexey Lapshin
2023-08-24libgloss: add Xtensa portAlexey Lapshin
Supported esp32 and esp32s2 boards: https://github.com/espressif/esp-toolchain-docs/blob/main/gcc/build-and-run-native-app.md
2023-08-09Add stub for getentropyTorbjörn SVENSSON
Example test case that fails with undefined reference to getentropy: Testing g++.robertl/eb77.C, -std=c++20 doing compile Executing on host: /build/gcc-13-2709-g9ac9fde961f/bin/arm-none-eabi-g++ /build/src/gcc/gcc/testsuite/g++.old-deja/g++.robertl/eb77.C -mthumb -march=armv6s-m -mcpu=cortex-m0 -mfloat-abi=soft -fdiagnostics-plain-output -fmessage-length=0 -std=c++20 -pedantic-errors -Wno-long-long -Wl,--start-group -lc -lm -Wl,--end-group --specs=nosys.specs -Wl,--allow-multiple-definition -Wl,-u,_isatty,-u,_fstat -Wl,-wrap,exit -Wl,-wrap,_exit -Wl,-wrap,main -Wl,-wrap,abort -Wl,g++_tg.o -lm -o ./eb77.exe (timeout = 800) spawn -ignore SIGHUP /build/gcc-13-2709-g9ac9fde961f/bin/arm-none-eabi-g++ /build/src/gcc/gcc/testsuite/g++.old-deja/g++.robertl/eb77.C -mthumb -march=armv6s-m -mcpu=cortex-m0 -mfloat-abi=soft -fdiagnostics-plain-output -fmessage-length=0 -std=c++20 -pedantic-errors -Wno-long-long -Wl,--start-group -lc -lm -Wl,--end-group --specs=nosys.specs -Wl,--allow-multiple-definition -Wl,-u,_isatty,-u,_fstat -Wl,-wrap,exit -Wl,-wrap,_exit -Wl,-wrap,main -Wl,-wrap,abort -Wl,g++_tg.o -lm -o ./eb77.exe pid is 28414 -28414 /build/gcc-13-2709-g9ac9fde961f/bin/../lib/gcc/arm-none-eabi/13.0.0/../../../../arm-none-eabi/bin/ld: /build/gcc-13-2709-g9ac9fde961f/bin/../lib/gcc/arm-none-eabi/13.0.0/../../../../arm-none-eabi/lib/thumb/v6-m/nofp/libstdc++.a(random.o): in function `std::(anonymous namespace)::__libc_getentropy(void*)': (.text._ZNSt12_GLOBAL__N_117__libc_getentropyEPv+0x8): undefined reference to `getentropy' /build/gcc-13-2709-g9ac9fde961f/bin/../lib/gcc/arm-none-eabi/13.0.0/../../../../arm-none-eabi/bin/ld: /build/gcc-13-2709-g9ac9fde961f/bin/../lib/gcc/arm-none-eabi/13.0.0/../../../../arm-none-eabi/lib/thumb/v6-m/nofp/libstdc++.a(random.o): in function `std::random_device::_M_init(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)': (.text._ZNSt13random_device7_M_initERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x58): undefined reference to `getentropy' /build/gcc-13-2709-g9ac9fde961f/bin/../lib/gcc/arm-none-eabi/13.0.0/../../../../arm-none-eabi/bin/ld: /build/gcc-13-2709-g9ac9fde961f/bin/../lib/gcc/arm-none-eabi/13.0.0/../../../../arm-none-eabi/lib/thumb/v6-m/nofp/libc.a(libc_a-arc4random.o): in function `_rs_stir': (.text._rs_stir+0x8): undefined reference to `getentropy' collect2: error: ld returned 1 exit status pid is -1 close result is 28414 exp6 0 1 output is /build/gcc-13-2709-g9ac9fde961f/bin/../lib/gcc/arm-none-eabi/13.0.0/../../../../arm-none-eabi/bin/ld: /build/gcc-13-2709-g9ac9fde961f/bin/../lib/gcc/arm-none-eabi/13.0.0/../../../../arm-none-eabi/lib/thumb/v6-m/nofp/libstdc++.a(random.o): in function `std::(anonymous namespace)::__libc_getentropy(void*)': (.text._ZNSt12_GLOBAL__N_117__libc_getentropyEPv+0x8): undefined reference to `getentropy' /build/gcc-13-2709-g9ac9fde961f/bin/../lib/gcc/arm-none-eabi/13.0.0/../../../../arm-none-eabi/bin/ld: /build/gcc-13-2709-g9ac9fde961f/bin/../lib/gcc/arm-none-eabi/13.0.0/../../../../arm-none-eabi/lib/thumb/v6-m/nofp/libstdc++.a(random.o): in function `std::random_device::_M_init(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)': (.text._ZNSt13random_device7_M_initERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x58): undefined reference to `getentropy' /build/gcc-13-2709-g9ac9fde961f/bin/../lib/gcc/arm-none-eabi/13.0.0/../../../../arm-none-eabi/bin/ld: /build/gcc-13-2709-g9ac9fde961f/bin/../lib/gcc/arm-none-eabi/13.0.0/../../../../arm-none-eabi/lib/thumb/v6-m/nofp/libc.a(libc_a-arc4random.o): in function `_rs_stir': (.text._rs_stir+0x8): undefined reference to `getentropy' collect2: error: ld returned 1 exit status status 1 compiler exited with status 1 FAIL: g++.old-deja/g++.robertl/eb77.C -std=c++20 (test for excess errors) Excess errors: (.text._ZNSt12_GLOBAL__N_117__libc_getentropyEPv+0x8): undefined reference to `getentropy' (.text._ZNSt13random_device7_M_initERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x58): undefined reference to `getentropy' (.text._rs_stir+0x8): undefined reference to `getentropy' UNRESOLVED: g++.old-deja/g++.robertl/eb77.C -std=c++20 compilation failed to produce executable Contributed by STMicroelectronics Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
2023-03-08libgloss/epiphany: Fix move instruction in crt0.SSebastian Huber
This patch relates to bug report: https://sourceware.org/bugzilla/show_bug.cgi?id=30212
2023-03-03arm: Restrict processor mode change when in hypervisor modeSrinath Parvathaneni
If a CPU implements EL2 as its highest exception level then programs using newlib may start in hypervisor mode. In that state it is not trivial to switch into the various EL1 modes to configure the individual exception stacks, so do not try.
2023-03-03arm: Fix the SP used in setting stack limit for standalone application.Srinath Parvathaneni
Move the instruction that saves SP before the mode check so that applications that start in USER mode correctly set the stack limit.
2023-02-22Fix libgloss/newlib build to conditionally use top include dirJeff Johnston
- conditionally use -idirafter option for arm
2023-01-14libgloss: csky: fix pointer-to-integer warningMike Frysinger
parameters is an array of integers, so assigning NULL (a pointer) doesn't make sense. Use 0 instead which produces the same code.
2023-01-14libgloss: merge csky into top-level MakefileMike Frysinger
Avoid a recursive make to speed things up a bit. A csky-elf build shows installed objects & libs produce same code.
2023-01-13libgloss: csky: use atexit to call fini-array functions.Xianmiao Qu
__libc_fini_array should be called upon exit to call the global termination functions in fini-array, use atexit to register it at __start.
2023-01-12libgloss: merge nios2 into top-level MakefileMike Frysinger
Avoid a recursive make to speed things up a bit. A nios2-elf build shows installed objects & libs produce same code.
2023-01-11libgloss: merge d30v into top-level MakefileMike Frysinger
Avoid a recursive make to speed things up a bit.
2023-01-11libgloss: merge arc into top-level MakefileMike Frysinger
Avoid a recursive make to speed things up a bit.
2023-01-11libgloss: merge arm into top-level MakefileMike Frysinger
Avoid a recursive make to speed things up a bit.
2023-01-11libgloss: arm: break newlib dependencyMike Frysinger
The libgloss port has been reaching back into newlib internals for a single header whose contents have been frozen for almost a decade. To break this backwards libgloss->newlib dependency, move the acle header to the srcroot include/ so everyone can use the same copy.
2023-01-10libgloss: merge aarch64 into top-level MakefileMike Frysinger
Avoid a recursive make to speed things up a bit.
2022-12-20libgloss: rs6000: fix incorrect install dir for xil filesMike Frysinger
The install steps were missing the multilib qualifier causing them to always install in the same location and stomp each other.
2022-12-20libgloss: merge arm configure script up a levelMike Frysinger
Move the minor arm-specific logic to a dedicated variable so we can merge its configure logic up a level.
2022-12-20libgloss: merge aarch64 configure script up a levelMike Frysinger
Move the minor aarch64-specific logic to a dedicated variable so we can merge its configure logic up a level.
2022-12-20libgloss: drop unused multi-build logicMike Frysinger
Now that aarch64 & arm have migrated off this, we can punt it.
2022-12-20libgloss: arm: inline multi-build logicMike Frysinger
Since no other port uses this custom libgloss multi-build.in logic, and it's making things difficult to unify, drop it all. The set of installed objects and their content should be the same. There is a difference in the builds: currently we compile all the objects in this subdir twice, but only a subset of them use a diff set of flags, and are actually installed (the librdimon.a and its objects). So this change speeds things up by removing the duplicate compilation. There is a short term cost in having to duplicate the compile rules for the files that are different, but this is minor when compared to being able to delete the unused multi-build logic (which we'll do in a sep commit), and we'll be able to clean this up when we move the code to unified automake. None of this should be confused with the common multilib logic. This is *multi-build* which is processed in parallel.
2022-12-20libgloss: aarch64: delete unused multi-build logicMike Frysinger
This logic looks like it was copied from the arm port, but it isn't actually used here. Since no other port uses this custom libgloss multi-build.in logic, and it's making things difficult to unify, and aarch64 isn't even using it, drop it all. The set of installed objects and their content should be the same. Once we move this to unified automake, if we want to readd support for subdir multi-builds, it'll be a lot easier as we can just add another set of objects with custom flags. None of this should be confused with the common multilib logic. This *multi-build* which is processed in parallel.
2022-12-14libgloss: bfin: switch to CPPASCOMPILE for .S->.oMike Frysinger
We're compiling .S files, so use CPPAS instead of CC to compile since the point of CPPAS is to preprocess+assemble .S files.
2022-10-20libgloss: riscv: Install machine/syscall.hSimon Cook
A recent change to the Makefile.in for riscv resulted in the machine/syscall.h header not being installed. This updates the file to install this file again. Signed-off-by: Simon Cook <simon.cook@embecosm.com>
2022-08-26libgloss: riscv: Convert to non-recursive automakePalmer Dabbelt
PR 29515 points out our documentation builds are broken, let's just move over to the new non-recursive builds. Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
2022-05-18Use global atexit data for all configurationsSebastian Huber
For the exit processing only members of _GLOBAL_REENT were used by default. If the _REENT_GLOBAL_ATEXIT option was enabled, then the data structures were provided through dedicated global objects. Make this option the default. Remove the option. Rename struct _reent members _atexit and _atexit0 to _reserved_6 and _reserved_7, respectively. Provide them only if _REENT_BACKWARD_BINARY_COMPAT is defined.
2022-04-27libgloss: pru: Fix _open syscal argumentsDimitar Dimitrov
The _open() C function is declared as having variable arguments in newlib, so second and third arguments are passed on stack. Add code to move them into registers, since that's where the PRU simulator expects them. Issue was exposed by the GCC test gcc.c-torture/execute/fprintf-2.c, which relies on tmpnam implementation to pass correct flags to _open. Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
2022-03-20Revert accidental change to v850/sim.ldJeff Law