C string litteral is const, fix return type of default_elfinterp. Remove #ifndef TCC_IS_NATIVE in arm-gen.c as suggested by grischka.

This commit is contained in:
Christian Jullien 2017-05-08 09:18:27 +02:00
parent 19d8b8a173
commit 56df27502c
2 changed files with 4 additions and 4 deletions

View File

@ -203,7 +203,7 @@ static int regmask(int r) {
/******************************************************/
#if defined(TCC_ARM_EABI) && !defined(CONFIG_TCC_ELFINTERP)
char *default_elfinterp(struct TCCState *s)
const char *default_elfinterp(struct TCCState *s)
{
if (s->float_abi == ARM_HARD_FLOAT)
return "/lib/ld-linux-armhf.so.3";
@ -2150,6 +2150,6 @@ ST_FUNC void gen_vla_alloc(CType *type, int align) {
#endif
/*************************************************************/
#ifndef TCC_IS_NATIVE
// #ifndef TCC_IS_NATIVE
#include "arm-asm.c"
#endif
// #endif

2
tcc.h
View File

@ -1534,7 +1534,7 @@ ST_FUNC void gen_opl(int op);
/* ------------ arm-gen.c ------------ */
#ifdef TCC_TARGET_ARM
#if defined(TCC_ARM_EABI) && !defined(CONFIG_TCC_ELFINTERP)
PUB_FUNC char *default_elfinterp(struct TCCState *s);
PUB_FUNC const char *default_elfinterp(struct TCCState *s);
#endif
ST_FUNC void arm_init(struct TCCState *s);
ST_FUNC void gen_cvt_itof1(int t);