Re: gcc help
On 05/18/2010 01:11 PM, packet wrote: How do i build gcc for linux? Oh the irony of the subject. This is better asked on the gcc-help mailing list. -- Joel Sherrill, Ph.D. Director of Research& Development joel.sherr...@oarcorp.comOn-Line Applications Research Ask me about RTEMS: a free RTOS Huntsville AL 35805 Support Available (256) 722-9985
gcc help
How do i build gcc for linux?
Re: gcc-help needed
anandulle wrote: > total no of increment count :: 0 > > > /home/ulle/gcc/native/cprog/pg1.c: In function ‘main’: > /home/ulle/gcc/native/cprog/pg1.c:7: internal compiler error: Segmentation > fault When you've been adding code to GCC and you see a seg fault crop up like this, it usually means you've done something bad with a pointer. (GCC has internal handlers that intercept things like NULL dereferences and convert them into the internal compiler error message you see above). You could run the compiler again using "-v" to see the command-line passed to cc1, and then run that under gdb, setting a breakpoint on "internal_error", and see where it gets called from. But I can work it out just from seeing the output and reading your code: it crashed just after you print the increment count, so what happens after that? if(flag_pass_gccwk09){ fprintf(dump_file,"\n\nNumber of assignment statements:: %d\n\n",numassigns); fprintf("\n\ntotal no of init expr :: %d\n\n",varexpr); fprintf(dump_file,"\n\nTotal Number of assignment statements (including temp vars):: %d\n\n",totalassigns); } Look at the middle fprintf: you forgot the 'dump_file' argument, so it's trying to treat the format string as a FILE* pointer! Argh! (Are you building with --disable-werror? I would have expected this to cause a warning and make the compiler build fail.) cheers, DaveK
gcc-help needed
i have added my own pass and i am trying to find out the number of variable declarations in a C program the code is attached for your reference http://www.nabble.com/file/p24656019/gccwk09.c gccwk09.c i am getting an error like this whats wrong kindly help me mainD.1181 = 0; return D.1181; Number of assignment statements:: 0 Total Number of assignment statements (including temp vars):: 1 total no of increment count :: 0 /home/ulle/gcc/native/cprog/pg1.c: In function ‘main’: /home/ulle/gcc/native/cprog/pg1.c:7: internal compiler error: Segmentation fault -- View this message in context: http://www.nabble.com/gcc-help-needed-tp24656019p24656019.html Sent from the gcc - Dev mailing list archive at Nabble.com.
Re: gcc --help for options which are not warnings or optimizations
Hi Ian, Hi Diego, > Diego Novillo wrote: --help=other? That works. :-) Actually, there already is a qualifier which will select -fstack-protector, I had just forgotten about it: % gcc --help=common | grep stack -Wstack-protector Warn when not issuing stack smashing protection -fdefer-pop Defer popping functions args from stack until -fomit-frame-pointerWhen possible do not generate stack frames -fstack-check Insert stack checking code into the program -fstack-limit This switch lacks documentation -fstack-limit-register= Trap if the stack goes past -fstack-limit-symbol= Trap if the stack goes past symbol -fstack-protector Use propolice as a stack protection method -fstack-protector-all Use a stack protection method for every function Cheers Nick
Re: gcc --help for options which are not warnings or optimizations
Nick Clifton writes: > Hi Ian, > >> Nick, how is gcc --help supposed to work for options which are neither >> warnings nor optimizations? For example, -fstack-protector. Is there a >> --help option which will display it? > > Yes - but only the generic "--help --verbose" rather than a more > qualified version. In that case I think that gcc --help should display something about --verbose. > I suppose we could add another qualifier along the lines of > "--help=not-otherwise-shown" but that seems rather klunky. Diego's --help=other suggestion seems reasonable. Ian
Re: gcc --help for options which are not warnings or optimizations
On Tue, Jun 2, 2009 at 05:38, Nick Clifton wrote: > I suppose we could add another qualifier along the lines of > "--help=not-otherwise-shown" but that seems rather klunky. --help=other? (I've got tons of other colors for this bike shed, if needed). Diego.
Re: gcc --help for options which are not warnings or optimizations
Hi Ian, Nick, how is gcc --help supposed to work for options which are neither warnings nor optimizations? For example, -fstack-protector. Is there a --help option which will display it? Yes - but only the generic "--help --verbose" rather than a more qualified version. My original goal with the qualifiers for --help was to enable to automatic collection of all optimization options available in a particular version of gcc. These would then be plugged in to a script to try out various different combinations of those options in the hopes of find the optimum selection. I suppose we could add another qualifier along the lines of "--help=not-otherwise-shown" but that seems rather klunky. Cheers Nick
gcc --help for options which are not warnings or optimizations
Nick, how is gcc --help supposed to work for options which are neither warnings nor optimizations? For example, -fstack-protector. Is there a --help option which will display it? Ian
nothrow (cross-posted to gcc-help)
I sent this message to gcc-h...@gcc.gnu.org yesterday, but have not gotten any mail on any thread from them? Are they active? Is there a problem with the mail server? Anyway I wrote a program, and when I compile it, I get: mich...@camille OurRPG $ make g++ -O2 -W -Wall -pedantic `sdl-config --cflags` -c draw.cpp enemyparty.o allyparty.o /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/g++-v4/memory: In function 'std::pair<_Tp*, int> std::__get_temporary_buffer(ptrdiff_t, _Tp*)': /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/g++-v4/memory:83: error: 'nothrow' was not declared in this scope /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/g++-v4/memory: In function 'void std::return_temporary_buffer(_Tp*)': /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/g++-v4/memory:123: error: 'nothrow' was not declared in this scope Is this a bug? I'm running gcc-4.1.2 on a Gentoo system: camille local # emerge -pv gcc These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] sys-devel/gcc-4.1.2 USE="doc fortran gtk mudflap nls vanilla (-altivec) -bootstrap -build -d -gcj (-hardened) -ip28 -ip32r10k -libffi (-multilib) -multislot (-n32) (-n64) -nocxx -objc -objc++ -objc-gc -test" 0 kB camille local # uname -a Linux camille 2.6.26-gentoo-r4 #1 SMP Sat Dec 13 17:31:25 CST 2008 i686 GNU/Linux Please advise...
gcc-help mailing list archive
Please send comments on these web pages [...] to our developer mailing list at [EMAIL PROTECTED] or gcc@gcc.gnu.org To complicate the harvesting of e-mail addresses from the web archives of the GCC mailing lists, some simple transformations are done on the e-mail addresses. Please, could you scramble my email address on the page http://gcc.gnu.org/ml/gcc-help/2000-11/msg00109.html On Nov 23, 2000, David Chapeau <[EMAIL PROTECTED]> wrote: in order to avoid access to spam robots ? Thanks in advance, __ David CHAPEAU Tel: +33 (0) 493 405 373 Ingenieur Systeme Url: http://sitgc.obs-azur.fr Service Informatique Grasse/Calern Observatoire de la Cote d'Azur Url: http://www.obs-azur.fr Avenue Nicolas CopernicTel: +33 (0) 493 405 353 06130 GRASSE - FRANCE Fax: +33 (0) 493 405 333 __
Re: gcc help
On Nov 30, 2005, at 2:40 PM, pati (sent by Nabble.com) wrote: I am trying to compile my code using gcc 3.3.2 provided with AMD Au1550 development CD. Wrong forum for this question. $(LD) -$(ENDIAN) -T test.ld -G 0 $(OBJS) -o $(NAME).elf Don't use ld to link, use gcc to link.
gcc help
Hi , I am new to gcc and shell commands. I am trying to compile my code using gcc 3.3.2 provided with AMD Au1550 development CD. When I compile my code, I get an error message with undefined references to printf and other file i/o functions. I saw a couple of emails in the forum with the same problem.But, I think I have problem with the makefile I am using. I never wrote a make file before and I am using the makefile from the hello World example given with Au1550 CD. It works for that example, but it crashes with my code. I am attching the makefile with this email.. # Program name NAME = test # Endian ifndef ENDIAN ENDIAN = EL endif # Tool-chain used for compilation of code # Win32 Cygwin toolchain TOOLCHAIN = cygwin # Monta Vista Hard Hat Linux toolchain #TOOLCHAIN = hhl ifeq ($(TOOLCHAIN),cygwin) TOOLSDIR = /usr/local/comp/mips-elf/gcc-3.3.2 AS = $(TOOLSDIR)/bin/mips-elf-as CC = $(TOOLSDIR)/bin/mips-elf-gcc -fno-builtin LD = $(TOOLSDIR)/bin/mips-elf-ld OD = $(TOOLSDIR)/bin/mips-elf-objdump OC = $(TOOLSDIR)/bin/mips-elf-objcopy #STRIP = $(TOOLSDIR)/bin/mips-elf-strip endif ifeq ($(TOOLCHAIN),hhl) TOOLSDIR = /opt/hardhat/devkit/mips/fp_le AS = $(TOOLSDIR)/bin/mips_fp_le-as CC = $(TOOLSDIR)/bin/mips_fp_le-gcc -fno-pic -mno-abicalls LD = $(TOOLSDIR)/bin/mips_fp_le-ld OD = $(TOOLSDIR)/bin/mips_fp_le-objdump OC = $(TOOLSDIR)/bin/mips_fp_le-objcopy #STRIP = $(TOOLSDIR)/bin/mips_fp_le-strip endif RM = rm -f # # GCC options valid for Au1000 # CFLAGS = -mips32 -G 0 -O2 -$(ENDIAN) -D$(ENDIAN) -Wa,-G0,-non_shared -I. # # Default rules for compiling/assembling # .c.o: $(CC) -c $(CFLAGS) $< -o $@ .S.o: $(CC) -c $(CFLAGS) -D_ASSEMBLER_ $< -o $@ # # Files to compile # OBJS = \ test.o # # Rule for making # all: $(OBJS) $(LD) -$(ENDIAN) -T test.ld -G 0 $(OBJS) -o $(NAME).elf $(OD) -D $(NAME).elf > $(NAME).dis $(OC) -O srec $(NAME).elf $(NAME).rec clean: $(RM) *.o $(RM) *.dis $(RM) *.rec $(RM) *.elf $(RM) *~ I got the linnker directive from the hello world example.I assume the problem is with the linker and with the test.ld file from the hello world example. I used SDE toolchain before with the same code ,but a different make file but I never got this problem before. I really need help on this immediately. Thanks in advance - Pati -- Sent from the gcc - General forum at Nabble.com: http://www.nabble.com/gcc-help-t648991.html#a1725379
Re: Gcc help pages about __mode__ keyword
Anton Soppelsa wrote: I wasn't able to find information about "__DI__" (on the gcc manual pages). The modes are defined in the internals documentation. http://gcc.gnu.org/onlinedocs/gccint/Machine-Modes.html#Machine-Modes By the way, do they mean Double-, Single-, Half-, Quarter-, -Integer? Essentially, but the "Integer" here isn't the same as the C "int" keyword, as this depends on some compiler internal defines, which can't easily be documented for end users. The attribute mode syntax was invented for use in some gcc library files, and isn't really meant for end users. You would be better off using types defined in stdint.h or inttypes.h such as int64_t. A kernel is a special case, as a kernel can't rely on C library features like stdint.h, and hence may need to rely on gcc internal stuff like attribute mode. Bugs should be filed into our bugzilla database, if you want action taken on them. -- Jim Wilson, GNU Tools Support, http://www.specifix.com
Gcc help pages about __mode__ keyword
Dear GCC help pages maintainers, I recently encountered a statement like this one __attribute__((__mode__(__DI__))) in a micro kernel source file. As I'm not so skilled with this kind of C/C++ syntax I tried to read the manual about the keywords involved in that expression. Despite I found information about "__attribute__" and "__mode__" I wasn't able to find information about "__DI__" (on the gcc manual pages). Of course I found in Internet partial explanation of the meaning of "__DI__" keyword and also found out that there are many of the same type like "__SI__", "__HI__", and "__QI__". By the way, do they mean Double-, Single-, Half-, Quarter-, -Integer? The point is that it seem to me those identifiers are actually keywords of the compiler. So they really have be mentioned (at least) in the compiler manual. Better would be if they are explained. I guess that part of the manual is not so well maintained because I found only reference to the keywords "__byte__" or "__word__" or "__pointer__". This message is just to inform u about something if u have the time to work about has to be done (in my opinion) . Best regards, -- Ing. Anton Soppelsa Consorzio RFX - Associazione EURATOM/ENEA sulla Fusione Corso Stati Uniti, 4 35127 Padova ITALY tel.: +39 049 829 5846 e-mail: [EMAIL PROTECTED]
Re: Gcc help
Hi Andre, Prebuilt GCC is available (downloadable) through Apple's Developer Tools. http://developer.apple.com/tools/xcode/index.html HTH, --Eljay
Gcc help
>>>/*please forward to appropriate people, I tried [EMAIL PROTECTED] twice and it doesnt work.*/ I have a G3 Powerbook with OS 10.3, and I tried installing GCC on it. I don't really know what I'm doing but I'm following instructions as much as possible. When trying to configure, I got line 2332: cc: command not found *** The command 'cc -o conftest -g conftest.c' failed. *** You must set the environment variable cc to a working compiler. I read in the archives that I need to install a pre-compiled binary of GCC. However, I do not know where to find one. I looked everywhere and the closest I think I got was openpkg.com but I'm just lost there. Please please help. I'm desperate. I need to be able to program again! Thanks Andre