* include/grub/dl.h: Remove double declaration of GRUB_MOD_DEP.
Use __unused__ rather than __used__ on gcc < 3.2.
This commit is contained in:
parent
0d3a6f8540
commit
f4ccf29dd5
2 changed files with 15 additions and 11 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2013-10-18 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* include/grub/dl.h: Remove double declaration of GRUB_MOD_DEP.
|
||||||
|
Use __unused__ rather than __used__ on gcc < 3.2.
|
||||||
|
|
||||||
2013-10-18 Vladimir Serbinenko <phcoder@gmail.com>
|
2013-10-18 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
* include/grub/setjmp.h: Define RETURNS_TWICE. Keep it empty for
|
* include/grub/setjmp.h: Define RETURNS_TWICE. Keep it empty for
|
||||||
|
|
|
@ -91,15 +91,6 @@ grub_mod_fini (void)
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef ASM_FILE
|
|
||||||
#define GRUB_MOD_DEP(name) \
|
|
||||||
static const char grub_module_depend_##name[] \
|
|
||||||
__attribute__((section(GRUB_MOD_SECTION(moddeps)), __used__)) = #name
|
|
||||||
#define GRUB_MOD_NAME(name) \
|
|
||||||
static const char grub_module_name_##name[] \
|
|
||||||
__attribute__((section(GRUB_MOD_SECTION(modname)), __used__)) = #name
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Me, Vladimir Serbinenko, hereby I add this module check as per new
|
/* Me, Vladimir Serbinenko, hereby I add this module check as per new
|
||||||
GNU module policy. Note that this license check is informative only.
|
GNU module policy. Note that this license check is informative only.
|
||||||
Modules have to be licensed under GPLv3 or GPLv3+ (optionally
|
Modules have to be licensed under GPLv3 or GPLv3+ (optionally
|
||||||
|
@ -109,11 +100,19 @@ static const char grub_module_name_##name[] \
|
||||||
Be sure to understand your license obligations.
|
Be sure to understand your license obligations.
|
||||||
*/
|
*/
|
||||||
#ifndef ASM_FILE
|
#ifndef ASM_FILE
|
||||||
|
#if GNUC_PREREQ (3,2)
|
||||||
|
#define ATTRIBUTE_USED __used__
|
||||||
|
#else
|
||||||
|
#define ATTRIBUTE_USED __unused__
|
||||||
|
#endif
|
||||||
#define GRUB_MOD_LICENSE(license) \
|
#define GRUB_MOD_LICENSE(license) \
|
||||||
static char grub_module_license[] __attribute__ ((section (GRUB_MOD_SECTION (module_license)), used)) = "LICENSE=" license;
|
static char grub_module_license[] __attribute__ ((section (GRUB_MOD_SECTION (module_license)), ATTRIBUTE_USED)) = "LICENSE=" license;
|
||||||
#define GRUB_MOD_DEP(name) \
|
#define GRUB_MOD_DEP(name) \
|
||||||
static const char grub_module_depend_##name[] \
|
static const char grub_module_depend_##name[] \
|
||||||
__attribute__((section(GRUB_MOD_SECTION(moddeps)), __used__)) = #name
|
__attribute__((section(GRUB_MOD_SECTION(moddeps)), ATTRIBUTE_USED)) = #name
|
||||||
|
#define GRUB_MOD_NAME(name) \
|
||||||
|
static const char grub_module_name_##name[] \
|
||||||
|
__attribute__((section(GRUB_MOD_SECTION(modname)), __used__)) = #name
|
||||||
#else
|
#else
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
.macro GRUB_MOD_LICENSE
|
.macro GRUB_MOD_LICENSE
|
||||||
|
|
Loading…
Reference in a new issue