mirror of
https://github.com/pspdev/pspsdk.git
synced 2025-10-03 08:41:34 +00:00
Rename libpsplibc to libcglue
This commit is contained in:
@@ -13,9 +13,9 @@ RUN cd /src && \
|
||||
make -j $(getconf _NPROCESSORS_ONLN) && \
|
||||
make -j $(getconf _NPROCESSORS_ONLN) install
|
||||
|
||||
## gcc needs to include libpsplibc libpsputility libpspnet_inet libpspnet_resolver libpspuser libpspkernel
|
||||
## gcc needs to include libcglue libpsputility libpspnet_inet libpspnet_resolver libpspuser libpspkernel
|
||||
## from pspsdk to be able to build executables, because they are part of the standard libraries
|
||||
RUN ln -sf "$PSPDEV/psp/sdk/lib/libpsplibc.a" "$PSPDEV/psp/lib/libpsplibc.a" || { exit 1; }
|
||||
RUN ln -sf "$PSPDEV/psp/sdk/lib/libcglue.a" "$PSPDEV/psp/lib/libcglue.a" || { exit 1; }
|
||||
RUN ln -sf "$PSPDEV/psp/sdk/lib/libpsputility.a" "$PSPDEV/psp/lib/libpsputility.a" || { exit 1; }
|
||||
RUN ln -sf "$PSPDEV/psp/sdk/lib/libpspnet_inet.a" "$PSPDEV/psp/lib/libpspnet_inet.a" || { exit 1; }
|
||||
RUN ln -sf "$PSPDEV/psp/sdk/lib/libpspnet_resolver.a" "$PSPDEV/psp/lib/libpspnet_resolver.a" || { exit 1; }
|
||||
|
@@ -22,9 +22,7 @@ See the LICENSE files for more information.
|
||||
* Stub libraries and headers for interfacing with the PSP operating system,
|
||||
ranging from threading libraries, file io, display driver and wifi networking.
|
||||
* Basic runtime support (crt0) for executables and libraries.
|
||||
* A minimal port of the Standard C Library (libc) is included. PSPSDK's
|
||||
mini-libc provides portable memory allocation, string formatting, and several
|
||||
other Standard C Library functions.
|
||||
* A libcglue library for fulfill newlib system call requirements.
|
||||
* Support code for linking with the full Standard C Library provided with the
|
||||
PSPDEV toolchain.
|
||||
* An implementation of the libGU graphics library. libGU provides an interface
|
||||
|
@@ -98,7 +98,7 @@ AC_CONFIG_FILES([Makefile
|
||||
src/gum/Makefile
|
||||
src/hprm/Makefile
|
||||
src/kernel/Makefile
|
||||
src/libc/Makefile
|
||||
src/libcglue/Makefile
|
||||
src/mp3/Makefile
|
||||
src/mpeg/Makefile
|
||||
src/nand/Makefile
|
||||
|
@@ -12,7 +12,7 @@ SUBDIRS = \
|
||||
gum \
|
||||
hprm \
|
||||
kernel \
|
||||
libc \
|
||||
libcglue \
|
||||
mp3 \
|
||||
mpeg \
|
||||
nand \
|
||||
|
@@ -29,7 +29,7 @@ GLUE_OBJS = __fill_stat.o __psp_heap_blockid.o __psp_free_heap.o _fork.o _wait.o
|
||||
_isatty.o symlink.o truncate.o chmod.o fchmod.o fchmodat.o pathconf.o readlink.o utime.o fchown.o getentropy.o
|
||||
|
||||
|
||||
INIT_OBJS = __psp_libc_init.o
|
||||
INIT_OBJS = __libcglue_init.o
|
||||
|
||||
MUTEXMAN_OBJS = __malloc_mutex.o __sbrk_mutex.o __fdman_mutex.o __init_mutex.o
|
||||
|
||||
@@ -49,7 +49,7 @@ TERMINATE_OBJS = _exit.o abort.o exit.o
|
||||
|
||||
TIMEZONE_OBJS = __timezone_update.o
|
||||
|
||||
lib_LIBRARIES = libpsplibc.a
|
||||
lib_LIBRARIES = libcglue.a
|
||||
|
||||
netdb_nobase_includedir = @PSPSDK_INCLUDEDIR@
|
||||
netdb_nobase_include_HEADERS = netdb.h
|
||||
@@ -63,7 +63,7 @@ arpa_nobase_include_HEADERS = arpa/inet.h
|
||||
sys_nobase_includedir = @PSPSDK_INCLUDEDIR@/sys
|
||||
sys_nobase_include_HEADERS = sys/socket.h sys/ioctl.h
|
||||
|
||||
libpsplibc_a_SOURCES = \
|
||||
libcglue_a_SOURCES = \
|
||||
cwd.o \
|
||||
errno.o \
|
||||
fdman.c \
|
||||
@@ -77,7 +77,7 @@ libpsplibc_a_SOURCES = \
|
||||
terminate.c \
|
||||
timezone.c
|
||||
|
||||
libpsplibc_a_LIBADD = $(CWD_OBJS) $(ERRNO_OBJS) $(FDMAN_OBJS) $(INIT_OBJS) $(GLUE_OBJS) $(MUTEXMAN_OBJS) $(NETDB_OBJS) $(PIPE_OBJS) \
|
||||
libcglue_a_LIBADD = $(CWD_OBJS) $(ERRNO_OBJS) $(FDMAN_OBJS) $(INIT_OBJS) $(GLUE_OBJS) $(MUTEXMAN_OBJS) $(NETDB_OBJS) $(PIPE_OBJS) \
|
||||
$(SELECT_OBJS) $(SOCKET_OBJS) $(SLEEP_OBJS) $(TERMINATE_OBJS) $(TIMEZONE_OBJS)
|
||||
|
||||
$(CWD_OBJS): cwd.c
|
@@ -3,7 +3,7 @@
|
||||
* -----------------------------------------------------------------------
|
||||
* Licensed under the BSD license, see LICENSE in PSPSDK root for details.
|
||||
*
|
||||
* init.c - The global init/deinit code for our crt0.
|
||||
* cwd.c - The global init/deinit code for our crt0.
|
||||
*
|
||||
* Copyright (c) 2005 Marcus R. Brown <mrbrown@ocgnet.org>
|
||||
* Copyright (c) 2005 James Forshaw <tyranid@gmail.com>
|
@@ -3,7 +3,7 @@
|
||||
* -----------------------------------------------------------------------
|
||||
* Licensed under the BSD license, see LICENSE in PSPSDK root for details.
|
||||
*
|
||||
* init.c - The global init/deinit code for our crt0.
|
||||
* errno.c - The global init/deinit code for our crt0.
|
||||
*
|
||||
* Copyright (c) 2005 Marcus R. Brown <mrbrown@ocgnet.org>
|
||||
* Copyright (c) 2005 James Forshaw <tyranid@gmail.com>
|
@@ -3,7 +3,7 @@
|
||||
* -----------------------------------------------------------------------
|
||||
* Licensed under the BSD license, see LICENSE in PSPSDK root for details.
|
||||
*
|
||||
* libcglue.c - Newlib-compatible system calls.
|
||||
* glue.c - Newlib-compatible system calls.
|
||||
*
|
||||
* Copyright (c) 2005 Marcus R. Brown <mrbrown@ocgnet.org>
|
||||
* Copyright (c) 2005 James Forshaw <tyranid@gmail.com>
|
@@ -21,14 +21,14 @@ void __timezone_update();
|
||||
void __fdman_init();
|
||||
void __init_mutex();
|
||||
|
||||
#ifdef F___psp_libc_init
|
||||
#ifdef F___libcglue_init
|
||||
/* Note: This function is being called from crt0.c/crt0_prx.c.
|
||||
* It is a weak function because can be override by user program,
|
||||
* saving a lot of space in your binary, however you will loose
|
||||
all the basic libc operation
|
||||
*/
|
||||
__attribute__((weak))
|
||||
void __psp_libc_init(int argc, char *argv[])
|
||||
void __libcglue_init(int argc, char *argv[])
|
||||
{
|
||||
(void) argc;
|
||||
|
@@ -3,7 +3,7 @@
|
||||
* -----------------------------------------------------------------------
|
||||
* Licensed under the BSD license, see LICENSE in PSPSDK root for details.
|
||||
*
|
||||
* timezon.c - Set proper timezone needed by newlib.
|
||||
* timezone.c - Set proper timezone needed by newlib.
|
||||
*
|
||||
* Copyright (c) 2021 Francisco Javier Trujillo Mata <fjtrujy@gmail.com>
|
||||
*
|
@@ -8,7 +8,7 @@ RANLIB = @PSP_RANLIB@
|
||||
|
||||
CPPFLAGS = -I$(top_srcdir)/src/base \
|
||||
-I$(top_srcdir)/src/kernel \
|
||||
-I$(top_srcdir)/src/libc \
|
||||
-I$(top_srcdir)/src/libcglue \
|
||||
-I$(top_srcdir)/src/user \
|
||||
-I$(top_srcdir)/src/net \
|
||||
-I$(top_srcdir)/src/utility \
|
||||
|
@@ -37,8 +37,8 @@ extern const char* sce_newlib_main_thread_name __attribute__((weak));
|
||||
toolchain. */
|
||||
extern SceModuleInfo module_info __attribute__((weak));
|
||||
|
||||
/* Allow newlib/psplibc to provide an init hook to be called before main */
|
||||
extern void __psp_libc_init(int argc, char *argv[]);
|
||||
/* Allow to provide a libc init hook to be called before main */
|
||||
extern void __libcglue_init(int argc, char *argv[]);
|
||||
extern void _init(void);
|
||||
extern void _fini(void);
|
||||
extern int main(int argc, char *argv[]);
|
||||
@@ -73,7 +73,7 @@ void _main(SceSize args, void *argp)
|
||||
argv[argc] = NULL;
|
||||
|
||||
/* Call libc initialization hook */
|
||||
__psp_libc_init(argc, argv);
|
||||
__libcglue_init(argc, argv);
|
||||
|
||||
/* Make sure _fini() is called when the program ends. */
|
||||
atexit((void *) _fini);
|
||||
|
@@ -40,8 +40,8 @@ extern const char* sce_newlib_main_thread_name __attribute__((weak));
|
||||
toolchain. */
|
||||
extern SceModuleInfo module_info __attribute__((weak));
|
||||
|
||||
/* Allow newlib/psplibc to provide an init hook to be called before main */
|
||||
extern void __psp_libc_init(int argc, char *argv[]);
|
||||
/* Allow to provide a libc init hook to be called before main */
|
||||
extern void __libcglue_init(int argc, char *argv[]);
|
||||
extern void _init(void);
|
||||
extern void _fini(void);
|
||||
extern int main(int argc, char *argv[]);
|
||||
@@ -78,7 +78,7 @@ void _main(SceSize args, void *argp)
|
||||
argv[argc] = NULL;
|
||||
|
||||
/* Call libc initialization hook */
|
||||
__psp_libc_init(argc, argv);
|
||||
__libcglue_init(argc, argv);
|
||||
|
||||
/* Make sure _fini() is called when the program ends. */
|
||||
atexit((void *) _fini);
|
||||
|
@@ -146,6 +146,6 @@ enum PspModuleInfoAttr
|
||||
|
||||
/* Disable the use of newlib, getting a minimal binary. */
|
||||
#define PSP_DISABLE_NEWLIB() \
|
||||
void __psp_libc_init(int argc, char *argv[]) {}
|
||||
void __libcglue_init(int argc, char *argv[]) {}
|
||||
|
||||
#endif /* PSPMODULEINFO_H */
|
||||
|
Reference in New Issue
Block a user