Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [cdt-dev] Managed Make Solutions, GCC and Linking problems

Hi rob,

The GCC tool-chain definitions can be found in
org.eclipse.cdt.managedbuilder.ui\plugin.xml.
Unfortunately, Solaris does not have a separate tool definition - the
definition is shared with linux, hpux, aix, qnx.  But, if you want to
make it work for your system:

1.  Search for Solaris.  You should find 6 Configuration definitions
that specify Solaris in the osList.
2.  For each compiler Tool definition within each of the Configuration
objects,
    O  Add the following attribute:

commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG}
${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}"

(There should be a space between ${OUTPUT_FLAG} and ${OUTPUT_PREFIX},
but on a single line.)

Regards,
Leo

-----Original Message-----
From: cdt-dev-admin@xxxxxxxxxxx [mailto:cdt-dev-admin@xxxxxxxxxxx] On
Behalf Of Rob Styles
Sent: Friday, March 18, 2005 12:00 PM
To: cdt-dev@xxxxxxxxxxx
Subject: RE: [cdt-dev] Managed Make Solutions, GCC and Linking problems

Ok, I think I've got it down to the makefile content in subdir.mk

for each of the .c sources we get:
  gcc -O0 -g3 -Wall -c -fmessage-length=0 -v -o$@ ../source/getMessage.c

Now, this passes through to the assembler as:
  /usr/ccs/bin/as -V -Qy -s -xarch=v8 -osource/main.o
/var/tmp//ccDPIZmN.s

The problem appears to be that the usage specifies [-o objfile]. If I
run the compile manually to generate the .s then run the assembler
manually with:
  /usr/ccs/bin/as -V -Qy -s -xarch=v8 -o source/main.o
/var/tmp//ccDPIZmN.s

NB: the space between -o and source/main.o, then everything works fine.

I tried then editing the subdir.mk to add the space into the gcc command
line and that makes everything work fine.

Does it make sense, then, to alter the templates that CDT is using to
generate my managed makefiles? If so, does anyone know where I can find
them?

thanks

rob



-----Original Message-----
From: cdt-dev-admin@xxxxxxxxxxx [mailto:cdt-dev-admin@xxxxxxxxxxx] On
Behalf Of Rob Styles
Sent: 18 March 2005 15:17
To: cdt-dev@xxxxxxxxxxx
Subject: [cdt-dev] Managed Make Solutions, GCC and Linking problems

Hey All,

I've got a problem with a managed make project under:

  CDT 2.1.0 (Eclipse 3.0.1)
  Solaris 2.8
  gcc version 3.4.2;
  /usr/ccs/bin/as: Sun WorkShop 6 2003/12/18 Compiler Common 6.0 Patch
114802-02

I've put together a quick HelloWorld with just two source files and one
header. The main calls a getMessage function which returns "Hello World"
which main then prints out to console.

This doesn't build for me :-(

Build output and code below. It appears (at very much face value) that
the assembler isn't being given any filenames to, well, assemble.

Can anyone help me out with some guesses at the settings I've missed?
I'm running with defaults in all the C/C++ Build > Tool Settings :-(

Thanks

Rob

____________________________________________________________________
**** Full rebuild of configuration Debug for project HelloWorld ****

make -k clean all 
rm -rf source/getMessage.o source/main.o   source/getMessage.d
source/main.d   HelloWorld
Building file: ../source/getMessage.c
gcc -O0 -g3 -Wall -c -fmessage-length=0 -osource/getMessage.o
../source/getMessage.c
/usr/ccs/bin/as: error: no input filename given
usage: /usr/ccs/bin/as [-V] [-Q{y,n}] [-f[O][if]#] [-q] [-s]
	  [-S] [-K {pic,PIC}] [-o objfile] [-L] [-T]
	  [-P [[-Ipath] [-Dname] [-Dname=def] [-Uname]]...]
	  [-m [-Ym,path]] [-n] [-ul] [-xF] [-xarch=v7] [-xarch=v8]
[-xarch=v8a] [-xarch=v8plus] [-xarch=v8plusa] [-xarch=v8plusb]
[-xarch=v9] [-xarch=v9a] [-xarch=v9b]  [-xcode={pic13,pic32}] file.s...
make: *** [source/getMessage.o] Error 1
Building file: ../source/main.c
gcc -O0 -g3 -Wall -c -fmessage-length=0 -osource/main.o ../source/main.c
/usr/ccs/bin/as: error: no input filename given
usage: /usr/ccs/bin/as [-V] [-Q{y,n}] [-f[O][if]#] [-q] [-s]
	  [-S] [-K {pic,PIC}] [-o objfile] [-L] [-T]
	  [-P [[-Ipath] [-Dname] [-Dname=def] [-Uname]]...]
	  [-m [-Ym,path]] [-n] [-ul] [-xF] [-xarch=v7] [-xarch=v8]
[-xarch=v8a] [-xarch=v8plus] [-xarch=v8plusa] [-xarch=v8plusb]
[-xarch=v9] [-xarch=v9a] [-xarch=v9b]  [-xcode={pic13,pic32}] file.s...
make: *** [source/main.o] Error 1
make: Target `all' not remade because of errors.
Build complete for project HelloWorl



main.c__________________________________________________
#include <stdio.h>
#include <stdlib.h>

#include "getMessage.h"

int main(int argc, char *argv[]) {
	printf((char*)getMessage());
	exit(0);
}

getMessage.c____________________________________________
char* getMessage() {
	return "Hello World";
}

getMessage.h____________________________________________
char* getMessage();



_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/cdt-dev


_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/cdt-dev


Back to the top