Help needed to compile gtest using GNU Hitex tools.

138 views
Skip to first unread message

Tameez

unread,
May 24, 2011, 10:26:15 AM5/24/11
to Google C++ Testing Framework
Hi there,
I want to compile gtest using ARM tools from Hitex. I tried providing
"Makefile" as an argument to the "arm-hitex-elf-g++.exe". But it's not
compiling. following is the output I got after issuing the following
command line.

C:\wa\svn\basecode\gtest\make>arm-hitex-elf-g++ Makefile
/cygdrive/c/Program Files/Hitex/GnuToolPackageArm/bin/../lib/gcc/arm-
hitex-elf/4
.1.1/../../../../arm-hitex-elf/bin/ld: crt0.o: No such file: No such
file or dir
ectory
collect2: ld returned 1 exit status


Note that I have added directory which contains "arm-hitex-elf-g+
+.exe" to the system path.

Thanks in advance,
Tameez.

Tameez

unread,
May 25, 2011, 7:13:42 AM5/25/11
to Google C++ Testing Framework

I replace following line C:\wa\svn\basecode\gtest\make>arm-hitex-elf-g+
+ Makefile
with nmake /f and tried to tweak the provided Makefile, but it's not
creating library. follwing is the output from the command window.


arm-hitex-elf-gcc.exe -DJAM_1 -I..\ -I..\.. -mcpu=arm968e-s -c
-gdwarf-2
-MD -Wall -O3 -mthumb-interwork -mapcs-frame -fsigned-char -mlittle-
endian -ma
rm -fomit-frame-pointer -fno-rtti -fno-exceptions -msoft-float -xc -o
C:\gtest\
gtest/src/gtest-all.cc
arm-hitex-elf-gcc: warning: '-x c' after last input file has no effect
arm-hitex-elf-gcc: no input files
NMAKE : fatal error U1077: '"c:\Program Files\Hitex\GnuToolPackageArm
\bin\arm-hi
tex-elf-gcc.exe"' : return code '0x1'

And following is the make file, I have created


GG = arm-hitex-elf-g++.exe
CC = arm-hitex-elf-gcc.exe
AS = arm-hitex-elf-as.exe
LD = arm-hitex-elf-ld.exe
OC = arm-hitex-elf-objcopy.exe

CCOPTIONS = -DJAM_1 -I..\ -I..\.. -mcpu=arm968e-s -c -gdwarf-2 -MD -
Wall -O3 \
-mthumb-interwork -mapcs-frame -fsigned-char -mlittle-endian -marm \
-fomit-frame-pointer -fno-rtti -fno-exceptions -msoft-float

GTEST_DIR = C:\gtest\gtest

USER_DIR = ../samples

TESTS = sample1_unittest

GTEST_HEADERS = $(GTEST_DIR)/include/gtest/*.h \
$(GTEST_DIR)/include/gtest/internal/*.h

GTEST_SRCS_ = $(GTEST_DIR)/src/*.cc $(GTEST_DIR)/src/*.h $
(GTEST_HEADERS)
#all: clean uflics.bin

#guflics.bin : guflics.mak

gtest-all.o :
$(CC) $(CCOPTIONS) -xc -o $(GTEST_DIR)/src/gtest-all.cc
gtest_main.o :
$(CC) $(CCOPTIONS) -xc -o $(GTEST_DIR)/src/gtest_main.cc

gtest.a : gtest-all.o
$(AS) -march=armv5te -mthumb-interwork -EL -W -I..\ -o $*.o ..\$*.s

gtest_main.a : gtest-all.o gtest_main.o
$(AS) -march=armv5te -mthumb-interwork -EL -W -I..\ -o $*.o ..\$*.s
#uflics.bin : uflics.elf
# $(OC) -O binary $*.elf $*.bin


#{..}.c.o:
#$(CC) $(CCOPTIONS) -xc -o $*.o ..\$*.c

#{..}.cpp.o:
# $(GG) $(CCOPTIONS) -xc++ -o $*.o ..\$*.cpp

#{..}.s.o:
# $(AS) -march=armv5te -mthumb-interwork -EL -W -I..\ -o $*.o ..\
$*.s

#uflics.bin : uflics.elf
# $(OC) -O binary $*.elf $*.bin
Reply all
Reply to author
Forward
0 new messages