nios2: fix r15 issue for gcc4
The "-ffixed-r15" option doesn't work well for gcc4. Since we don't use gp for small data with option "-G0", we can use gp as global data pointer. This allows compiler to use r15. It is necessary for gcc4 to work properly. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Signed-off-by: Scott McNutt <smcnutt@psyent.com>
This commit is contained in:
committed by
Scott McNutt
parent
661ba14051
commit
0df01fd3d7
@@ -48,6 +48,6 @@ typedef struct global_data {
|
||||
#define GD_FLG_LOGINIT 0x00020 /* Log Buffer has been initialized */
|
||||
#define GD_FLG_DISABLE_CONSOLE 0x00040 /* Disable console (in & out) */
|
||||
|
||||
#define DECLARE_GLOBAL_DATA_PTR register gd_t *gd asm ("r15")
|
||||
#define DECLARE_GLOBAL_DATA_PTR register gd_t *gd asm ("gp")
|
||||
|
||||
#endif /* __ASM_NIOS2_GLOBALDATA_H_ */
|
||||
|
||||
Reference in New Issue
Block a user