compiler.h: add __weak macro

Instead of writing out '__attribute__((weak))' use a shorter form.

Change-Id: If418a1d55052780077febd2d8f2089021f414b91
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/25767
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Justin TerAvest <teravest@chromium.org>
diff --git a/src/soc/intel/common/block/pmc/pmclib.c b/src/soc/intel/common/block/pmc/pmclib.c
index cf87d05..38d4196 100644
--- a/src/soc/intel/common/block/pmc/pmclib.c
+++ b/src/soc/intel/common/block/pmc/pmclib.c
@@ -16,6 +16,7 @@
 #include <arch/early_variables.h>
 #include <arch/io.h>
 #include <cbmem.h>
+#include <compiler.h>
 #include <console/console.h>
 #include <halt.h>
 #include <intelblocks/pmclib.h>
@@ -75,7 +76,7 @@
 	}
 }
 
-__attribute__ ((weak)) uint32_t soc_get_smi_status(uint32_t generic_sts)
+__weak uint32_t soc_get_smi_status(uint32_t generic_sts)
 {
 	return generic_sts;
 }
@@ -84,7 +85,7 @@
  * Set PMC register to know which state system should be after
  * power reapplied
  */
-__attribute__ ((weak)) void pmc_soc_restore_power_failure(void)
+__weak void pmc_soc_restore_power_failure(void)
 {
 	/*
 	 * SoC code should set PMC config register in order to set
@@ -332,7 +333,7 @@
 	pmc_clear_gpi_gpe_status();
 }
 
-__attribute__ ((weak))
+__weak
 void soc_clear_pm_registers(uintptr_t pmc_bar)
 {
 }
@@ -351,7 +352,7 @@
 	soc_clear_pm_registers(pmc_bar);
 }
 
-__attribute__ ((weak))
+__weak
 int soc_prev_sleep_state(const struct chipset_power_state *ps,
 			      int prev_sleep_state)
 {