Skip to content

Commit adf3e78

Browse files
committed
pgl_* entry points
1 parent 037f970 commit adf3e78

File tree

7 files changed

+154
-254
lines changed

7 files changed

+154
-254
lines changed

configure

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4322,7 +4322,7 @@ else
43224322
ac_save_c_werror_flag=$ac_c_werror_flag
43234323
ac_c_werror_flag=yes
43244324
ac_cv_prog_cc_g=no
4325-
CFLAGS="-g"
4325+
CFLAGS="-g2"
43264326
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43274327
/* end confdefs.h. */
43284328

@@ -4353,7 +4353,7 @@ if ac_fn_c_try_compile "$LINENO"; then :
43534353

43544354
else
43554355
ac_c_werror_flag=$ac_save_c_werror_flag
4356-
CFLAGS="-g"
4356+
CFLAGS="-g2"
43574357
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43584358
/* end confdefs.h. */
43594359

@@ -4381,13 +4381,13 @@ if test "$ac_test_CFLAGS" = set; then
43814381
CFLAGS=$ac_save_CFLAGS
43824382
elif test $ac_cv_prog_cc_g = yes; then
43834383
if test "$GCC" = yes; then
4384-
CFLAGS="-g -O2"
4384+
CFLAGS="-g2 -Os"
43854385
else
4386-
CFLAGS="-g"
4386+
CFLAGS="-g2"
43874387
fi
43884388
else
43894389
if test "$GCC" = yes; then
4390-
CFLAGS="-O2"
4390+
CFLAGS="-Os"
43914391
else
43924392
CFLAGS=
43934393
fi
@@ -4853,7 +4853,7 @@ else
48534853
ac_save_cxx_werror_flag=$ac_cxx_werror_flag
48544854
ac_cxx_werror_flag=yes
48554855
ac_cv_prog_cxx_g=no
4856-
CXXFLAGS="-g"
4856+
CXXFLAGS="-g2"
48574857
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48584858
/* end confdefs.h. */
48594859

@@ -4884,7 +4884,7 @@ if ac_fn_cxx_try_compile "$LINENO"; then :
48844884

48854885
else
48864886
ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4887-
CXXFLAGS="-g"
4887+
CXXFLAGS="-g2"
48884888
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48894889
/* end confdefs.h. */
48904890

@@ -4912,13 +4912,13 @@ if test "$ac_test_CXXFLAGS" = set; then
49124912
CXXFLAGS=$ac_save_CXXFLAGS
49134913
elif test $ac_cv_prog_cxx_g = yes; then
49144914
if test "$GXX" = yes; then
4915-
CXXFLAGS="-g -O2"
4915+
CXXFLAGS="-g2 -Os"
49164916
else
4917-
CXXFLAGS="-g"
4917+
CXXFLAGS="-g2"
49184918
fi
49194919
else
49204920
if test "$GXX" = yes; then
4921-
CXXFLAGS="-O2"
4921+
CXXFLAGS="-Os"
49224922
else
49234923
CXXFLAGS=
49244924
fi
@@ -5278,11 +5278,11 @@ elif test "${CFLAGS+set}" = set; then
52785278
elif test "$enable_coverage" = yes; then
52795279
: # no optimization by default
52805280
elif test "$GCC" = yes; then
5281-
CFLAGS="-O2"
5281+
CFLAGS="-Os"
52825282
else
52835283
# if the user selected debug mode, don't use -O
52845284
if test "$enable_debug" != yes; then
5285-
CFLAGS="-O"
5285+
CFLAGS="-Os"
52865286
fi
52875287
fi
52885288

@@ -5293,11 +5293,11 @@ elif test "${CXXFLAGS+set}" = set; then
52935293
elif test "$enable_coverage" = yes; then
52945294
: # no optimization by default
52955295
elif test "$GCC" = yes; then
5296-
CXXFLAGS="-O2"
5296+
CXXFLAGS="-Os"
52975297
else
52985298
# if the user selected debug mode, don't use -O
52995299
if test "$enable_debug" != yes; then
5300-
CXXFLAGS="-O"
5300+
CXXFLAGS="-Os"
53015301
fi
53025302
fi
53035303

@@ -5310,12 +5310,12 @@ fi
53105310
if test "$ac_env_BITCODE_CFLAGS_set" = set; then
53115311
BITCODE_CFLAGS=$ac_env_BITCODE_CFLAGS_value
53125312
else
5313-
BITCODE_CFLAGS="-O2 $BITCODE_CFLAGS"
5313+
BITCODE_CFLAGS="-Os $BITCODE_CFLAGS"
53145314
fi
53155315
if test "$ac_env_BITCODE_CXXFLAGS_set" = set; then
53165316
BITCODE_CXXFLAGS=$ac_env_BITCODE_CXXFLAGS_value
53175317
else
5318-
BITCODE_CXXFLAGS="-O2 $BITCODE_CXXFLAGS"
5318+
BITCODE_CXXFLAGS="-Os $BITCODE_CXXFLAGS"
53195319
fi
53205320

53215321
# C[XX]FLAGS we determined above will be added back at the end
@@ -7826,11 +7826,11 @@ fi
78267826

78277827
# supply -g if --enable-debug
78287828
if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
7829-
CFLAGS="$CFLAGS -g"
7829+
CFLAGS="$CFLAGS -g2"
78307830
fi
78317831

78327832
if test "$enable_debug" = yes && test "$ac_cv_prog_cxx_g" = yes; then
7833-
CXXFLAGS="$CXXFLAGS -g"
7833+
CXXFLAGS="$CXXFLAGS -g2"
78347834
fi
78357835

78367836
# enable code coverage if --enable-coverage
@@ -13588,7 +13588,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1358813588
#ifdef __cplusplus
1358913589
extern "C"
1359013590
#endif
13591-
char uuid_export ();
13591+
extern char uuid_export ();
1359213592
int
1359313593
main ()
1359413594
{
@@ -13650,7 +13650,7 @@ $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
1365013650
if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
1365113651
UUID_LIBS="-luuid"
1365213652
else
13653-
as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
13653+
ac_cv_lib_ossp_uuid_uuid_export=yes
1365413654
fi
1365513655

1365613656
fi

src/Makefile.shlib

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,33 @@ ifeq ($(SHLIB_EXPORTS),)
233233
override CXXFLAGS += $(CXXFLAGS_SL_MODULE)
234234
endif
235235

236+
ifeq ($(PORTNAME), emscripten)
237+
LINK.shared = emsdk-shared
238+
ifdef soname
239+
# emscripten uses unversioned shared libraries
240+
shlib = $(shlib_bare)
241+
soname = $(shlib_bare)
242+
endif
243+
BUILD.exports = ( echo '{ global:'; $(AWK) '/^[^\#]/ {printf "%s;\n",$$1}' $<; echo ' local: *; };' ) >$@
244+
exports_file = $(SHLIB_EXPORTS:%.txt=%.list)
245+
# ifneq (,$(exports_file))
246+
# LINK.shared += -Wl,--version-script=$(exports_file)
247+
# endif
248+
endif
249+
250+
ifeq ($(PORTNAME), wasi)
251+
LINK.shared = wasi-shared
252+
ifdef soname
253+
# emscripten uses unversioned shared libraries
254+
shlib = $(shlib_bare)
255+
soname = $(shlib_bare)
256+
endif
257+
BUILD.exports = ( echo '{ global:'; $(AWK) '/^[^\#]/ {printf "%s;\n",$$1}' $<; echo ' local: *; };' ) >$@
258+
exports_file = $(SHLIB_EXPORTS:%.txt=%.list)
259+
# ifneq (,$(exports_file))
260+
# LINK.shared += -Wl,--version-script=$(exports_file)
261+
# endif
262+
endif
236263

237264
##
238265
## BUILD
@@ -248,8 +275,11 @@ all-lib: lib$(NAME).pc
248275
endif
249276

250277
all-static-lib: $(stlib)
251-
278+
ifdef wasi
279+
all-shared-lib: all-static-lib
280+
else
252281
all-shared-lib: $(shlib)
282+
endif
253283

254284
# In this rule, "touch $@" works around a problem on some platforms wherein
255285
# ar updates the library file's mod time with a value calculated to

src/backend/commands/async.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1700,8 +1700,12 @@ SignalBackends(void)
17001700
* NotifyQueueLock; which is unlikely but certainly possible. So we
17011701
* just log a low-level debug message if it happens.
17021702
*/
1703+
#if defined(__EMSCRIPTEN__)
1704+
HandleNotifyInterrupt();
1705+
#else
17031706
if (SendProcSignal(pid, PROCSIG_NOTIFY_INTERRUPT, ids[i]) < 0)
17041707
elog(DEBUG3, "could not signal backend with PID %d: %m", pid);
1708+
#endif
17051709
}
17061710

17071711
pfree(pids);

0 commit comments

Comments
 (0)