Skip to content
Permalink
Browse files
8266916: Simplify logic for creating libSysLookup
Reviewed-by: sundar
  • Loading branch information
mcimadamore committed May 11, 2021
1 parent 9d22e43 commit 669eb8764b0d1db1f6719e51080414ea549ed37f
Showing with 3 additions and 36 deletions.
  1. +1 −7 make/modules/jdk.incubator.foreign/Lib.gmk
  2. +2 −29 src/jdk.incubator.foreign/share/native/libsyslookup/syslookup.c
@@ -29,22 +29,16 @@ ifeq ($(call isTargetOs, linux), true)

$(eval $(call SetupJdkLibrary, BUILD_LIBCSTDLIB, \
NAME := syslookup, \
OPTIMIZATION := HIGH, \
DISABLED_WARNINGS_gcc := sign-compare pointer-arith, \
DISABLED_WARNINGS_clang := sign-compare pointer-arith format-nonliteral, \
CFLAGS := $(CFLAGS_JDKLIB), \
CXXFLAGS := $(CXXFLAGS_JDKLIB), \
LDFLAGS := -Wl$(COMMA)--no-as-needed -lc -lm $(LDFLAGS_JDKLIB) $(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS := -Wl$(COMMA)--no-as-needed -lc -lm -ldl $(LDFLAGS_JDKLIB) $(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS := $(LIBCXX), \
))

else ifeq ($(call isTargetOs, windows), false)

$(eval $(call SetupJdkLibrary, BUILD_LIBCSTDLIB, \
NAME := syslookup, \
OPTIMIZATION := HIGH, \
DISABLED_WARNINGS_gcc := sign-compare pointer-arith, \
DISABLED_WARNINGS_clang := sign-compare pointer-arith format-nonliteral, \
CFLAGS := $(CFLAGS_JDKLIB), \
CXXFLAGS := $(CXXFLAGS_JDKLIB), \
LDFLAGS := $(LDFLAGS_JDKLIB) $(call SET_SHARED_LIBRARY_ORIGIN), \
@@ -23,33 +23,6 @@
* questions.
*/

#include <assert.h>
#include <complex.h>
#include <ctype.h>
#include <errno.h>
#include <fenv.h>
#include <float.h>
#include <inttypes.h>
#include <iso646.h>
#include <limits.h>
#include <locale.h>
#include <math.h>
#include <setjmp.h>
#include <signal.h>
#include <stdalign.h>
#include <stdarg.h>
#include <stdatomic.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
// Note: the include below is not strictly required, as dependencies will be pulled using linker flags.
// Adding at least one #include removes unwanted warnings on some platforms.
#include <stdlib.h>
#include <stdnoreturn.h>
#include <string.h>
#include <tgmath.h>
// #include <threads.h>
#include <time.h>
// #include <uchar.h>
#include <wchar.h>
#include <wctype.h>

0 comments on commit 669eb87

Please sign in to comment.