Skip to content

Commit

Permalink
8266916: Simplify logic for creating libSysLookup
Browse files Browse the repository at this point in the history
Reviewed-by: sundar
  • Loading branch information
mcimadamore committed May 11, 2021
1 parent 9d22e43 commit 669eb87
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 36 deletions.
8 changes: 1 addition & 7 deletions make/modules/jdk.incubator.foreign/Lib.gmk
Expand Up @@ -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), \
Expand Down
31 changes: 2 additions & 29 deletions src/jdk.incubator.foreign/share/native/libsyslookup/syslookup.c
Expand Up @@ -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.