Skip to content

Instantly share code, notes, and snippets.

@xranby
Last active August 29, 2015 13:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xranby/564b4e043acfd1c7cd45 to your computer and use it in GitHub Desktop.
Save xranby/564b4e043acfd1c7cd45 to your computer and use it in GitHub Desktop.
jigong icedtea-web 3 plugin
cd /home/user/icedtea-web/plugin/icedteanp && \
g++ -g -O2 \
IcedTeaNPPlugin.o IcedTeaScriptablePluginObject.o IcedTeaJavaRequestProcessor.o IcedTeaPluginRequestProcessor.o IcedTeaPluginUtils.o IcedTeaParseProperties.o \
-lglib-2.0 \
\
-fPIC -nostdlib -Bdynamic -static-libgcc -shared -o /home/user/icedtea-web/plugin/icedteanp/IcedTeaPlugin.so
IcedTeaNPPlugin.o: In function `__static_initialization_and_destruction_0':
/home/user/icedtea-web/plugin/icedteanp/IcedTeaNPPlugin.cc:235: undefined reference to `__dso_handle'
IcedTeaScriptablePluginObject.o: In function `__static_initialization_and_destruction_0':
/usr/include/c++/4.7/iostream:75: undefined reference to `__dso_handle'
IcedTeaJavaRequestProcessor.o: In function `__static_initialization_and_destruction_0':
/usr/include/c++/4.7/iostream:75: undefined reference to `__dso_handle'
IcedTeaPluginRequestProcessor.o: In function `_Vector_impl':
/usr/include/c++/4.7/bits/stl_vector.h:88: undefined reference to `__dso_handle'
IcedTeaPluginUtils.o: In function `__static_initialization_and_destruction_0':
/home/user/icedtea-web/plugin/icedteanp/IcedTeaPluginUtils.cc:57: undefined reference to `__dso_handle'
IcedTeaPluginUtils.o:/home/user/icedtea-web/plugin/icedteanp/IcedTeaPluginUtils.cc:57: more undefined references to `__dso_handle' follow
collect2: error: ld returned 1 exit status
make: *** [/home/user/icedtea-web/plugin/icedteanp/IcedTeaPlugin.so] Error 1
xranby@ac100-armhf:/home/user/icedtea-web$ git diff
diff --git a/Makefile.am b/Makefile.am
index 1e5b715..4570532 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -314,7 +314,7 @@ $(PLUGIN_DIR)/%.o: $(PLUGIN_SRCDIR)/%.cc
$(GLIB_CFLAGS) \
$(MOZILLA_CFLAGS) \
-fvisibility=hidden \
- -fPIC -o $@ -c $<
+ -fPIC -nostdlib -Bdynamic -static-libgcc -o $@ -c $<
$(PLUGIN_DIR)/$(BUILT_PLUGIN_LIBRARY): $(addprefix $(PLUGIN_DIR)/,$(PLUGIN_OBJE
cd $(PLUGIN_DIR) && \
@@ -322,7 +322,7 @@ $(PLUGIN_DIR)/$(BUILT_PLUGIN_LIBRARY): $(addprefix $(PLUGIN_
$(PLUGIN_OBJECTS) \
$(GLIB_LIBS) \
$(MOZILLA_LIBS) \
- -shared -o $@
+ -fPIC -nostdlib -Bdynamic -static-libgcc -shared -o $@
# Start of CPP Unit test targets
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment