Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Toolchain with only preprocessing/compiling/assembling
Toolchain with only preprocessing/compiling/assembling [message #213231] Wed, 02 April 2008 09:44
Eclipse UserFriend
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.
Previous Topic:Error : isym field of reference table entry past the end of the symbol table
Next Topic:Linux makefiles to Windows CDT makefiles?
Goto Forum:
  


Current Time: Thu Nov 21 19:15:01 GMT 2024

Powered by FUDForum. Page generated in 0.03482 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top