Browse Source

gluon-web: build with -fvisibility=hidden

Matthias Schiffer 6 years ago
parent
commit
2681622018
2 changed files with 2 additions and 1 deletions
  1. 1 1
      package/gluon-web/src/Makefile
  2. 1 0
      package/gluon-web/src/template_lualib.c

+ 1 - 1
package/gluon-web/src/Makefile

@@ -1,7 +1,7 @@
 all: compile
 
 %.o: %.c
-	$(CC) $(CPPFLAGS) $(CFLAGS) -D_GNU_SOURCE -std=c99 -Wall -Wextra -fPIC -c -o $@ $<
+	$(CC) $(CPPFLAGS) $(CFLAGS) -D_GNU_SOURCE -std=c99 -Wall -Wextra -fPIC -fvisibility=hidden -c -o $@ $<
 
 clean:
 	rm -f parser.so *.o

+ 1 - 0
package/gluon-web/src/template_lualib.c

@@ -122,6 +122,7 @@ static const luaL_reg R[] = {
 	{}
 };
 
+__attribute__ ((visibility("default")))
 LUALIB_API int luaopen_gluon_web_template_parser(lua_State *L) {
 	luaL_register(L, TEMPLATE_LUALIB_META, R);
 	return 1;