Toolchain with only preprocessing/compiling/assembling [message #213231] |
Wed, 02 April 2008 09:44 |
Eclipse User |
|
|
|
Originally posted by: deam_38.yahoo.fr
Hi,
I would like to create my own gcc tool chain which is just a sub-set of
ones defined in the MBS: I want to stop the build process just after the
assembling phase (with my project's .o files created). I don't want to
link or archive it.
Thus I've tried to extend the
org.eclipse.cdt.managedbuilder.core.buildDefinitions extension point,
defining my own project type and configuration.
I've also defined my own toolchain, made of only the assembler and
compiler tools respectivly having as superClass
cdt.managedbuild.tool.gnu.assembler and
cdt.managedbuild.tool.gnu.cpp.compiler.cygwin.
I set the targetTool as the GCC Compiler.
The builder is the cdt.managedbuild.target.gnu.builder one.
I've tested it for a very simple project and I abtained the following
message
<code>
**** Build of configuration Debug for project ComponentTest2 ****
make all
Building target: ComponentTest2
Invoking: Cygwin C++ Compiler
g++ -O0 -g3 -Wall -c -fmessage-length=0 -o"ComponentTest2"
g++: no input files
make: *** [ComponentTest2] Error 1
</code>
The generated makefile is the following:
<code>
...
# All Target
all: ComponentTest2
# Tool invocations
ComponentTest2:
@echo 'Building target: $@'
@echo 'Invoking: Cygwin C++ Compiler'
g++ -O0 -g3 -Wall -c -fmessage-length=0 -o"ComponentTest2"
@echo 'Finished building target: $@'
@echo ' '
...
</code>
The generated subdir.mk is the following:
<code>
# Add inputs and outputs from these tool invocations to the build
variables
CPP_SRCS += \
../src/tac_gpio.cpp
CPP_DEPS += \
/src/tac_gpio.d
# Each subdirectory must supply rules for building sources it contributes
src/%.o: ../src/%.cpp
@echo 'Building file: $<'
@echo 'Invoking: Cygwin C++ Compiler'
g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)"
-MT"$(@:%.o=%.d)" -o"$@" "$<"
@echo 'Finished building: $<'
@echo ' '
</code>
What am I doining wrong ??
Thanks for any help.
|
|
|
Powered by
FUDForum. Page generated in 0.05176 seconds