Added "attribute internal" to __MACH__ platforms
Also, makefile does not add compiling options (LOCAL) to linker flags (MYLDFLAGS).
This commit is contained in:
18
llimits.h
18
llimits.h
@@ -303,21 +303,21 @@ typedef unsigned long l_uint32;
|
|||||||
** LUAI_DDEF and LUAI_DDEC are marks for all extern (const) variables,
|
** LUAI_DDEF and LUAI_DDEC are marks for all extern (const) variables,
|
||||||
** none of which to be exported to outside modules (LUAI_DDEF for
|
** none of which to be exported to outside modules (LUAI_DDEF for
|
||||||
** definitions and LUAI_DDEC for declarations).
|
** definitions and LUAI_DDEC for declarations).
|
||||||
** Elf/gcc (versions 3.2 and later) mark them as "hidden" to optimize
|
** Elf and MACH/gcc (versions 3.2 and later) mark them as "hidden" to
|
||||||
** access when Lua is compiled as a shared library. Not all elf targets
|
** optimize access when Lua is compiled as a shared library. Not all elf
|
||||||
** support this attribute. Unfortunately, gcc does not offer a way to
|
** targets support this attribute. Unfortunately, gcc does not offer
|
||||||
** check whether the target offers that support, and those without
|
** a way to check whether the target offers that support, and those
|
||||||
** support give a warning about it. To avoid these warnings, change to
|
** without support give a warning about it. To avoid these warnings,
|
||||||
** the default definition.
|
** change to the default definition.
|
||||||
*/
|
*/
|
||||||
#if !defined(LUAI_FUNC)
|
#if !defined(LUAI_FUNC)
|
||||||
|
|
||||||
#if defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) >= 302) && \
|
#if defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) >= 302) && \
|
||||||
defined(__ELF__) /* { */
|
(defined(__ELF__) || defined(__MACH__))
|
||||||
#define LUAI_FUNC __attribute__((visibility("internal"))) extern
|
#define LUAI_FUNC __attribute__((visibility("internal"))) extern
|
||||||
#else /* }{ */
|
#else
|
||||||
#define LUAI_FUNC extern
|
#define LUAI_FUNC extern
|
||||||
#endif /* } */
|
#endif
|
||||||
|
|
||||||
#define LUAI_DDEC(dec) LUAI_FUNC dec
|
#define LUAI_DDEC(dec) LUAI_FUNC dec
|
||||||
#define LUAI_DDEF /* empty */
|
#define LUAI_DDEF /* empty */
|
||||||
|
|||||||
2
makefile
2
makefile
@@ -72,7 +72,7 @@ LOCAL = $(TESTS) $(CWARNS)
|
|||||||
# For C89, "-std=c89 -DLUA_USE_C89"
|
# For C89, "-std=c89 -DLUA_USE_C89"
|
||||||
# Note that Linux/Posix options are not compatible with C89
|
# Note that Linux/Posix options are not compatible with C89
|
||||||
MYCFLAGS= $(LOCAL) -std=c99 -DLUA_USE_LINUX
|
MYCFLAGS= $(LOCAL) -std=c99 -DLUA_USE_LINUX
|
||||||
MYLDFLAGS= $(LOCAL) -Wl,-E
|
MYLDFLAGS= -Wl,-E
|
||||||
MYLIBS= -ldl
|
MYLIBS= -ldl
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user