Merge pull request #379 from libtom/private-symbols
enable MP_PRIVATE (visibility=hidden)
This commit is contained in:
commit
0a3fa328c7
@ -78,7 +78,7 @@ $(LIBMAIN_S): $(OBJECTS)
|
|||||||
|
|
||||||
#Create DLL + import library libtommath.dll.a
|
#Create DLL + import library libtommath.dll.a
|
||||||
$(LIBMAIN_D) $(LIBMAIN_I): $(OBJECTS)
|
$(LIBMAIN_D) $(LIBMAIN_I): $(OBJECTS)
|
||||||
$(CC) -s -shared -o $(LIBMAIN_D) $^ -Wl,--enable-auto-import,--export-all -Wl,--out-implib=$(LIBMAIN_I) $(LTM_LDFLAGS)
|
$(CC) -s -shared -o $(LIBMAIN_D) $^ tommath.def -Wl,--out-implib=$(LIBMAIN_I) $(LTM_LDFLAGS)
|
||||||
$(STRIP) -S $(LIBMAIN_D)
|
$(STRIP) -S $(LIBMAIN_D)
|
||||||
|
|
||||||
#Build test suite
|
#Build test suite
|
||||||
|
@ -14,11 +14,9 @@
|
|||||||
*
|
*
|
||||||
* On Unix symbols can be marked as hidden if libtommath is compiled
|
* On Unix symbols can be marked as hidden if libtommath is compiled
|
||||||
* as a shared object. By default, symbols are visible.
|
* as a shared object. By default, symbols are visible.
|
||||||
* As of now, this feature is opt-in via the MP_PRIVATE_SYMBOLS define.
|
|
||||||
*
|
|
||||||
* On Win32 a .def file must be used to specify the exported symbols.
|
* On Win32 a .def file must be used to specify the exported symbols.
|
||||||
*/
|
*/
|
||||||
#if defined (MP_PRIVATE_SYMBOLS) && defined(__GNUC__) && __GNUC__ >= 4
|
#if defined(__GNUC__) && __GNUC__ >= 4 && !defined(_WIN32)
|
||||||
# define MP_PRIVATE __attribute__ ((visibility ("hidden")))
|
# define MP_PRIVATE __attribute__ ((visibility ("hidden")))
|
||||||
#else
|
#else
|
||||||
# define MP_PRIVATE
|
# define MP_PRIVATE
|
||||||
|
Loading…
Reference in New Issue
Block a user