From dee23fa6c8789845347f5d8aba6f011422489853 Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Fri, 19 Oct 2018 11:12:59 +0000 Subject: [PATCH 2/2] Use -fvisibility=hidden by default when building with gcc This effectively unexports the following 168 internal symbols: B fgDisplay B fgJoystick B fgStructure B fghBindBuffer B fghBufferData B fghDeleteBuffers B fghDisableVertexAttribArray B fghEnableVertexAttribArray B fghGenBuffers B fghVertexAttribPointer B sball_initialized D fgFontFixed8x13 D fgFontFixed9x15 D fgFontHelvetica10 D fgFontHelvetica12 D fgFontHelvetica18 D fgFontTimesRoman10 D fgFontTimesRoman24 D fgState D fgStrokeMonoRoman D fgStrokeRoman D xi_opcode T XParseGeometry T fgAddToWindowDestroyList T fgCheckActiveMenu T fgCloseWindow T fgCloseWindows T fgCreateMenu T fgCreateStructure T fgCreateWindow T fgDeactivateMenu T fgDeinitialize T fgDestroyMenu T fgDestroyStructure T fgDestroyWindow T fgDisplayMenu T fgElapsedTime T fgEnumMenus T fgEnumSubWindows T fgEnumWindows T fgError T fgGetActiveMenu T fgHandleExtensionEvents T fgHasSpaceball T fgHintPresent T fgInitGL2 T fgInitialiseInputDevices T fgInitialiseJoysticks T fgInitialiseSpaceball T fgInputDeviceClose T fgInputDeviceDetect T fgIsSpaceballXEvent T fgJoystickClose T fgJoystickDetect T fgJoystickPollWindow T fgListAppend T fgListInit T fgListInsert T fgListLength T fgListRemove T fgMenuByID T fgOpenWindow T fgPlatformChangeDisplayMode T fgPlatformCloseDisplay T fgPlatformCloseWindow T fgPlatformCreateWindow T fgPlatformDeinitialiseInputDevices T fgPlatformDestroyContext T fgPlatformEnterGameMode T fgPlatformFullScreenToggle T fgPlatformGetConfig T fgPlatformGetGLUTProcAddress T fgPlatformGetGameModeVMaxExtent T fgPlatformGetModifiers T fgPlatformGetProcAddress T fgPlatformGlutDeviceGet T fgPlatformGlutGet T fgPlatformGlutGetModeValues T fgPlatformGlutSetIconTitle T fgPlatformGlutSetWindowTitle T fgPlatformGlutSwapBuffers T fgPlatformHasSpaceball T fgPlatformHideWindow T fgPlatformIconifyWindow T fgPlatformInitWork T fgPlatformInitialize T fgPlatformInitializeSpaceball T fgPlatformJoystickClose T fgPlatformJoystickInit T fgPlatformJoystickOpen T fgPlatformJoystickRawRead T fgPlatformLeaveGameMode T fgPlatformMainLoopPreliminaryWork T fgPlatformOpenWindow T fgPlatformPopWindow T fgPlatformPosResZordWork T fgPlatformPositionWindow T fgPlatformProcessSingleEvent T fgPlatformPushWindow T fgPlatformRegisterDialDevice T fgPlatformRememberState T fgPlatformReshapeWindow T fgPlatformRestoreState T fgPlatformSetCursor T fgPlatformSetWindow T fgPlatformShowWindow T fgPlatformSleepForEvents T fgPlatformSpaceballClose T fgPlatformSpaceballNumButtons T fgPlatformSpaceballSetWindow T fgPlatformSystemTime T fgPlatformVisibilityWork T fgPlatformWarpPointer T fgPrintXIDeviceEvent T fgPrintXILeaveEvent T fgProcessWork T fgRegisterDevices T fgSetCursor T fgSetWindow T fgSpaceballClose T fgSpaceballHandleXEvent T fgSpaceballNumButtons T fgSpaceballSetWindow T fgSystemTime T fgUpdateMenuHighlight T fgWarning T fgWindowByHandle T fgWindowByID T fghCalculateMenuBoxSize T fghChooseConfig T fghCloseInputDevices T fghContextCreationError T fghCreateNewContext T fghDefaultReshape T fghDrawGeometrySolid T fghDrawGeometryWire T fghFontByID T fghGenerateCone T fghGenerateCylinder T fghGenerateTorus T fghIsLegacyContextRequested T fghMapBit T fghNumberOfAuxBuffersRequested T fghOnPositionNotify T fghOnReshapeNotify T fghParseCommandLineArguments T fghPlatformGetCursorPos T fghPlatformGlutGetGLX T fghRedrawWindow T fghRedrawWindowAndChildren T glutJoystickGetCenter T glutJoystickGetDeadBand T glutJoystickGetMaxRange T glutJoystickGetMinRange T glutJoystickGetNumAxes T glutJoystickGetNumButtons T glutJoystickGetSaturation T glutJoystickNotWorking T glutJoystickSetCenter T glutJoystickSetDeadBand T glutJoystickSetMaxRange T glutJoystickSetMinRange T glutJoystickSetSaturation T serial_close T serial_flush T serial_getchar T serial_open T serial_putchar --- freeglut/freeglut/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/freeglut/freeglut/CMakeLists.txt b/freeglut/freeglut/CMakeLists.txt index d1c20e8..ea208c0 100644 --- a/freeglut/freeglut/CMakeLists.txt +++ b/freeglut/freeglut/CMakeLists.txt @@ -302,6 +302,7 @@ IF(WIN32) ENDIF() IF(CMAKE_COMPILER_IS_GNUCC) + SET(CMAKE_C_VISIBILITY_PRESET hidden) SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") IF(NOT(ANDROID OR BLACKBERRY OR FREEGLUT_WAYLAND)) # not setting -ansi as EGL/KHR headers doesn't support it