Adding isort

This commit is contained in:
Gerardo J. Puerta
2020-09-15 10:56:07 +02:00
parent 20d0f8b41c
commit 73dd5b7bae
66 changed files with 6453 additions and 1 deletions

View File

@ -0,0 +1,32 @@
* drop Solaris linker stuff
--- a/configure.in
+++ b/configure.in
@@ -1988,26 +1988,14 @@
CPU_ARCH=`uname -p`
MDCPUCFG_H=_solaris.cfg
PR_MD_CSRCS=solaris.c
- LD=/usr/ccs/bin/ld
MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
RESOLVE_LINK_SYMBOLS=1
- case "${OS_RELEASE}" in
- 5.8|5.9)
- ;;
- *)
- # It is safe to use the -Bdirect linker flag on Solaris 10 or later.
- USE_B_DIRECT=1
- ;;
- esac
if test -n "$GNU_CC"; then
DSO_CFLAGS=-fPIC
if `$CC -print-prog-name=ld` -v 2>&1 | grep -c GNU >/dev/null; then
GCC_USE_GNU_LD=1
fi
- DSO_LDOPTS='-shared -Wl,-h,$(notdir $@),-z,combreloc,-z,defs,-z,ignore'
- if test -n "$USE_B_DIRECT"; then
- DSO_LDOPTS="$DSO_LDOPTS,-Bdirect"
- fi
+ DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
else
DSO_CFLAGS=-KPIC
DSO_LDOPTS='-G -h $(notdir $@) -z combreloc -z defs -z ignore'

View File

@ -0,0 +1,53 @@
From 8c57451f44d7ceb37bfb4ae6e457fc70b1f58d0a Mon Sep 17 00:00:00 2001
From: Moritz Kick <gentoo@blackphoenix.de>
Date: Wed, 20 Mar 2019 13:36:06 -0500
Subject: [PATCH] Added IPv6 compatibility for musl libc
Signed-off-by: Moritz Kick <gentoo@blackphoenix.de>
Signed-off-by: Jory Pratt <anarchy@gentoo.org>
---
pr/include/md/_linux.h | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/pr/include/md/_linux.h b/pr/include/md/_linux.h
index 2370ab8..612184c 100644
--- a/pr/include/md/_linux.h
+++ b/pr/include/md/_linux.h
@@ -289,33 +289,22 @@ static inline PRInt32 _MD_ATOMIC_SET(PRInt32 *ptr, PRInt32 nv)
#endif /* __arm__ */
#define USE_SETJMP
-#if (defined(__GLIBC__) && __GLIBC__ >= 2) || defined(ANDROID)
#define _PR_POLL_AVAILABLE
-#endif
#undef _PR_USE_POLL
#define _PR_STAT_HAS_ONLY_ST_ATIME
#if defined(__alpha) || defined(__ia64__)
#define _PR_HAVE_LARGE_OFF_T
-#elif (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) \
- || defined(ANDROID)
-#define _PR_HAVE_OFF64_T
#else
-#define _PR_NO_LARGE_FILES
+#define _PR_HAVE_OFF64_T
#endif
-#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) \
- || defined(ANDROID)
#define _PR_INET6
#define _PR_HAVE_INET_NTOP
#define _PR_HAVE_GETHOSTBYNAME2
#define _PR_HAVE_GETADDRINFO
#define _PR_INET6_PROBE
-#endif
#ifndef ANDROID
#define _PR_HAVE_SYSV_SEMAPHORES
#define PR_HAVE_SYSV_NAMED_SHARED_MEMORY
-#endif
-/* Android has gethostbyname_r but not gethostbyaddr_r or gethostbyname2_r. */
-#if (__GLIBC__ >= 2) && defined(_PR_PTHREADS)
#define _PR_HAVE_GETHOST_R
#define _PR_HAVE_GETHOST_R_INT
#endif
--
2.21.0

View File

@ -0,0 +1,26 @@
--- a/pr/src/misc/prtime.c
+++ b/pr/src/misc/prtime.c
@@ -1621,7 +1621,7 @@
case TT_EET: zone_offset = 2 * 60; break;
case TT_JST: zone_offset = 9 * 60; break;
default:
- PR_ASSERT (0);
+ return PR_FAILURE;
break;
}
}
@@ -1677,11 +1677,12 @@
struct tm localTime;
time_t secs;
- PR_ASSERT(result->tm_month > -1 &&
+ if (!(result->tm_month > -1 &&
result->tm_mday > 0 &&
result->tm_hour > -1 &&
result->tm_min > -1 &&
- result->tm_sec > -1);
+ result->tm_sec > -1))
+ return PR_FAILURE;
/*
* To obtain time_t from a tm structure representing the local

View File

@ -0,0 +1,26 @@
--- a/pr/src/misc/prtime.c
+++ b/pr/src/misc/prtime.c
@@ -1536,7 +1536,7 @@
case TT_EET: zone_offset = 2 * 60; break;
case TT_JST: zone_offset = 9 * 60; break;
default:
- PR_ASSERT (0);
+ return PR_FAILURE;
break;
}
}
@@ -1578,11 +1578,12 @@
struct tm localTime;
time_t secs;
- PR_ASSERT(result->tm_month > -1 &&
+ if (!(result->tm_month > -1 &&
result->tm_mday > 0 &&
result->tm_hour > -1 &&
result->tm_min > -1 &&
- result->tm_sec > -1);
+ result->tm_sec > -1))
+ return PR_FAILURE;
/*
* To obtain time_t from a tm structure representing the local

View File

@ -0,0 +1,14 @@
Same magic as haubi did for glib compilation, which works again here
resolving a linker problem on Solaris with GNU ld. Bug #222625
--- a/pr/src/Makefile.in
+++ b/pr/src/Makefile.in
@@ -95,7 +95,7 @@
endif
ifdef USE_PTHREADS
-OS_LIBS = -lpthread ${LIBRT} -lsocket -lnsl -ldl -lc
+OS_LIBS = -pthread ${LIBRT} -lsocket -lnsl -ldl -lc
else
ifdef LOCAL_THREADS_ONLY
OS_LIBS = -lsocket -lnsl -ldl -lc

View File

@ -0,0 +1,25 @@
Don't use @executable_path, it messed up linking against nspr from e.g.
nss.
--- a/configure.in
+++ b/configure.in
@@ -1007,7 +1007,7 @@
;;
esac
DSO_CFLAGS=-fPIC
- DSO_LDOPTS='-dynamiclib -compatibility_version 1 -current_version 1 -all_load -install_name @executable_path/$@ -headerpad_max_install_names'
+ DSO_LDOPTS='-dynamiclib -compatibility_version 1 -current_version 1 -all_load -install_name $(libdir)/$@ -headerpad_max_install_names'
_OPTIMIZE_FLAGS=-O2
MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
STRIP="$STRIP -x -S"
--- a/configure
+++ b/configure
@@ -1007,7 +1007,7 @@
;;
esac
DSO_CFLAGS=-fPIC
- DSO_LDOPTS='-dynamiclib -compatibility_version 1 -current_version 1 -all_load -install_name @executable_path/$@ -headerpad_max_install_names'
+ DSO_LDOPTS='-dynamiclib -compatibility_version 1 -current_version 1 -all_load -install_name $(libdir)/$@ -headerpad_max_install_names'
_OPTIMIZE_FLAGS=-O2
MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
STRIP="$STRIP -x -S"

View File

@ -0,0 +1,28 @@
Use CFLAGS when linking. Some flags can add functionality to generated
code that requires extra libs to be linked in (eg. libgomp when using
autoparallelization). Other flags are required when building and linking
(eg. -flto).
https://bugs.gentoo.org/365975
--- a/config/autoconf.mk.in
+++ b/config/autoconf.mk.in
@@ -81,6 +81,7 @@ OS_DLLFLAGS = @OS_DLLFLAGS@
DLLFLAGS = @DLLFLAGS@
EXEFLAGS = @EXEFLAGS@
OPTIMIZER = @OPTIMIZER@
+LD_CFLAGS = @CFLAGS@
PROFILE_GEN_CFLAGS = @PROFILE_GEN_CFLAGS@
PROFILE_GEN_LDFLAGS = @PROFILE_GEN_LDFLAGS@
--- a/config/config.mk
+++ b/config/config.mk
@@ -72,7 +72,7 @@ NOMD_CFLAGS = $(CC_ONLY_FLAGS) $(OPTIMIZER) $(NOMD_OS_CFLAGS)\
NOMD_CCFLAGS = $(CCC_ONLY_FLAGS) $(OPTIMIZER) $(NOMD_OS_CFLAGS)\
$(XP_DEFINE) $(DEFINES) $(INCLUDES) $(XCFLAGS)
-LDFLAGS = $(OS_LDFLAGS)
+LDFLAGS = $(LD_CFLAGS) $(OS_LDFLAGS)
# Enable profile-guided optimization
ifdef MOZ_PROFILE_GENERATE

View File

@ -0,0 +1,11 @@
--- a/config/nspr-config.in
+++ b/config/nspr-config.in
@@ -126,7 +126,7 @@
fi
if test "$echo_libs" = "yes"; then
- libdirs=-L$libdir
+ libdirs=""
if test -n "$lib_plds"; then
libdirs="$libdirs -lplds${major_version}"
fi