Permalink
Browse files

Seal libtool's black magic, using LLVMAddGlobalMapping() is simpler.

 * .gitignore
   Revert to nickg's master.
   Only keeping /src/nvc.exe to ignore.
 * autogen.sh
   Revert to nickg's master.
 * configure.ac
   Revert to nickg's master.
 * config.h.in
   Revert to nickg's master.
 * Makefile.am
   Revert to nickg's master.
 * src/Makefile.am
   Revert to nickg's master.
 * src/rt/Makefile.am
   Revert to nickg's master.
  • Loading branch information...
1 parent f062476 commit 070764ae196288b14e8cff25ade5eabaa54f000b @hiyuh committed Feb 22, 2012
Showing with 11 additions and 58 deletions.
  1. +0 −5 .gitignore
  2. +0 −4 Makefile.am
  3. +0 −1 autogen.sh
  4. +0 −7 config.h.in
  5. +8 −22 configure.ac
  6. +2 −17 src/Makefile.am
  7. +1 −2 src/rt/Makefile.am
View
@@ -13,8 +13,6 @@ Makefile.in
/compile
*.o
*.a
-*.lo
-*.la
*~
TAGS
logs
@@ -23,14 +21,11 @@ src/lexer.c
src/parse.[ch]
src/parse.output
.deps
-.libs
/config.h
/config.log
/config.status
/config.guess
/config.sub
-/libtool
-/ltmain.sh
/src/nvc
/src/nvc.exe
/lib/std/std
View
@@ -3,12 +3,8 @@ SUBDIRS = src lib test
EXTRA_DIST = autogen.sh
ACLOCAL_AMFLAGS = -I m4
-LIBTOOL_DEPS = @LIBTOOL_DEPS@
bootstrap: all
@cd lib && $(MAKE) $(AM_MAKEFLAGS) bootstrap
-libtool: $(LIBTOOL_DEPS)
- $(SHELL) ./config.status --recheck
-
.PHONY: bootstrap
View
@@ -1,4 +1,3 @@
-libtoolize
aclocal -I m4
autoconf
automake -a
View
@@ -33,9 +33,6 @@
/* Define to 1 if library supports certain obsolete features */
#undef HAVE_CURSES_OBSOLETE
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#undef HAVE_DLFCN_H
-
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
@@ -203,10 +200,6 @@
/* Version of LLVM installed */
#undef LLVM_VERSION
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
- */
-#undef LT_OBJDIR
-
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
#undef NO_MINUS_C_MINUS_O
View
@@ -15,13 +15,7 @@ AC_PROG_INSTALL
AC_PROG_MKDIR_P
AC_PROG_YACC
AM_PROG_LEX
-
-# On cygwin, the dlsym function can only find symbols in a loaded DLL.
-# If the symbol is in the .EXE file then the symbol doesn't get found.
-# See also:
-# http://lists.cs.uiuc.edu/pipermail/llvmdev/2005-June/004364.html
-LT_INIT([shared,static,win32-dll])
-AC_SUBST([LIBTOOL_DEPS])
+AC_PROG_RANLIB
AC_C_INLINE
@@ -37,8 +31,8 @@ AC_TYPE_UINT32_T
AC_TYPE_UINT64_T
AC_TYPE_PID_T
-AC_FUNC_MMAP
-AC_FUNC_ALLOCA
+AC_FUNC_MMAP
+AC_FUNC_ALLOCA
AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_FUNC_FORK
@@ -70,22 +64,14 @@ PKG_CHECK_MODULES([CHECK], [check >= 0.9.4], [], [])
AX_DEFINE_DIR([DATADIR], [datadir/nvc], [Installation data directory])
+# On cygwin local headers can sometimes be included instead
+# of system ones which is worked around using -I-. A better
+# solution would be to have automake use -iquote.
case $host_os in
- *cygwin* | *mingw* | *pw32*)
- ON_WIN32=yes
-
- # On cygwin, local headers can sometimes be included instead
- # of system ones which is worked around using -I-. A better
- # solution would be to have automake use -iquote.
- # And more bad news, libltdl does't build w/ -I-.
- # FIXME: mingw and pw32 really want it too?
- I_BARRIER=-I-
- ;;
+ *cygwin* ) CFLAGS="$CFLAGS -I-" ;;
esac
-AC_SUBST(ON_WIN32)
-AM_CONDITIONAL(ON_WIN32, test x"$ON_WIN32" = x"yes")
-AC_SUBST(I_BARRIER)
AC_CONFIG_HEADERS([config.h])
AC_OUTPUT([Makefile src/Makefile src/rt/Makefile test/Makefile \
lib/Makefile lib/std/Makefile lib/ieee/Makefile])
+
View
@@ -5,6 +5,7 @@ noinst_LIBRARIES = libcgen.a libnvc.a
AM_CFLAGS = -Wall -Werror
AM_YFLAGS = -d --locations --report=all
+AM_LDFLAGS = -rdynamic $(LLVM_LDFLAGS)
BUILT_SOURCES = parse.h
@@ -19,22 +20,6 @@ nvc_SOURCES = nvc.c
# Force C++ linking
nodist_EXTRA_nvc_SOURCES = dummy.cxx
-if ON_WIN32
-AM_LDFLAGS = @LDFLAGS@ -no-undefined -module -avoid-version -shared $(LLVM_LDFLAGS)
-lib_LTLIBRARIES = libnvc-stub.la
-libnvc_stub_la_SOURCES = lib.c util.c ident.c parse.y lexer.l tree.c type.c \
- sem.c elab.c simp.c driver.c dump.c opt.c link.c \
- cgen.c \
- rt/rtkern.c rt/slave.c rt/shell.c rt/alloc.c rt/vcd.c rt/heap.c \
- rt/jit.c
-# See configure.ac for detail of @I_BARRIER@
-# libtool adds -D_GNU_SOURCE, then ""_GNU_SOURCE" redefined" warning appears.
-# libtool adds -DNDEBUG, then "control reaches end of non-void function" warning appears.
-libnvc_stub_la_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/rt @I_BARRIER@ $(LLVM_CFLAGS) -U_GNU_SOURCE -UNDEBUG
-libnvc_stub_la_LIBADD = $(LLVM_LIBS) $(CURSES_LIB)
-nvc_LDADD = libnvc-stub.la $(LLVM_LIBS) $(CURSES_LIB)
-else
-AM_LDFLAGS = -rdynamic $(LLVM_LDFLAGS)
nvc_LDADD = libnvc.a libcgen.a rt/libnvc-rt.a rt/libjit.a $(LLVM_LIBS) \
$(CURSES_LIB)
-endif
+
View
@@ -1,7 +1,6 @@
noinst_LIBRARIES = libnvc-rt.a libjit.a
-# See configure.ac for detail of @I_BARRIER@
-AM_CFLAGS = -Wall -Werror -I$(srcdir)/.. @I_BARRIER@
+AM_CFLAGS = -Wall -Werror -I$(srcdir)/..
libnvc_rt_a_SOURCES = rtkern.c slave.c shell.c alloc.c vcd.c heap.c

0 comments on commit 070764a

Please sign in to comment.