Я хотел бы скомпилировать простую тестовую программу в c с инструментальной связкой ARM.Проблема с кросс-компиляцией
Мой Makefile выглядит следующим образом:
CC=/project_path/arm-linux-uclibcgnueabi/bin/gcc
# the compiler: gcc for C program, define as g++ for C++
# compiler flags:
# -g adds debugging information to the executable file
# -Wall turns on most, but not all, compiler warnings
CFLAGS = -g -Wall
# the build target executable:
TARGET = test
all: $(TARGET)
$(TARGET): $(TARGET).c
$(CC) $(CFLAGS) -o $(TARGET) $(TARGET).c
clean:
$(RM) $(TARGET)
Файл test.c это только для теста компиляции:
#include <stdio.h>
int main(void) {
printf("just for test \n");
return 0;
}
Когда я выполняю сделать, я получаю следующее сообщение об ошибке:
/project_path/arm-linux-uclibcgnueabi/bin/gcc -g -Wall -o test test.c
gcc: error trying to exec 'cc1': execvp: No such file or directory
Makefile:13: recipe for target 'test' failed
make: *** [test] Error 1
Что не так с моим файлом Makefile?
Существует ли '/ project_path/arm-linux-uclibcgnueabi/bin/gcc' и имеет исполняемые разрешения? – dmi
Возможный дубликат [Gcc error: gcc: ошибка пытается выполнить exec cc1 ': execvp: нет такого файла или каталога] (http://stackoverflow.com/questions/11912878/gcc-error-gcc-error-trying-to -exec-cc1-execvp-no-such-file-or-directory) – js441
yes/project_path/arm-linux-uclibcgnueabi/bin/gcc имеет разрешение на исполнение: -rwxr-xr-x –