From 0a5dd940728ed9f94a74ddd92b394aabc23f20c9 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sun, 3 Aug 2014 12:20:30 +0300 Subject: [PATCH] Fixed whole program (link-time) optimization build with Clang --- src/g_level.h | 2 +- src/thingdef/thingdef.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/g_level.h b/src/g_level.h index 0cd366798b..ec867c2261 100644 --- a/src/g_level.h +++ b/src/g_level.h @@ -52,7 +52,7 @@ class FScanner; #define GCC_YSEG #else #define MSVC_YSEG -#define GCC_YSEG __attribute__((section(SECTION_YREG))) +#define GCC_YSEG __attribute__((section(SECTION_YREG))) __attribute__((used)) #endif struct FIntermissionDescriptor; diff --git a/src/thingdef/thingdef.h b/src/thingdef/thingdef.h index c388a8544f..5225b787a9 100644 --- a/src/thingdef/thingdef.h +++ b/src/thingdef/thingdef.h @@ -266,11 +266,11 @@ enum EDefinitionType #define GCC_MSEG #else #define MSVC_ASEG -#define GCC_ASEG __attribute__((section(SECTION_AREG))) +#define GCC_ASEG __attribute__((section(SECTION_AREG))) __attribute__((used)) #define MSVC_PSEG -#define GCC_PSEG __attribute__((section(SECTION_GREG))) +#define GCC_PSEG __attribute__((section(SECTION_GREG))) __attribute__((used)) #define MSVC_MSEG -#define GCC_MSEG __attribute__((section(SECTION_MREG))) +#define GCC_MSEG __attribute__((section(SECTION_MREG))) __attribute__((used)) #endif