* Re: gcc question
[not found] <200002032057.MAA15624@yamato.synopsys.com>
@ 2000-02-03 16:13 ` Joe Buck
2000-02-06 19:26 ` Alexandre Oliva
1 sibling, 0 replies; 18+ messages in thread
From: Joe Buck @ 2000-02-03 16:13 UTC (permalink / raw)
To: Joe Buck; +Cc: Martin v. Loewis, oliva, sklee, gcc
At the risk of drifting offtopic, I should correct something I previously
wrote.
> > #! /bin/sh
> > echo $* >/tmp/prog.cmdline
>
I wrote:
> This is a common shell programming mistake.
> Use of $* breaks if there is a quoted argument that has special characters
> or whitespace. Use "$@" rather than $*. Otherwise there's fun with
> things like
>
> prog '`rm -rf /`'
While my advice to use "$@" rather than $* is correct, command
substitution happens before variable substitution, so /bin/rm wouldn't
be executed by the above command. The more common problem with use of
$* is when an argument must be passed that contains spaces.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: gcc question
[not found] <200002032057.MAA15624@yamato.synopsys.com>
2000-02-03 16:13 ` gcc question Joe Buck
@ 2000-02-06 19:26 ` Alexandre Oliva
1 sibling, 0 replies; 18+ messages in thread
From: Alexandre Oliva @ 2000-02-06 19:26 UTC (permalink / raw)
To: Joe Buck; +Cc: Martin v. Loewis, sklee, gcc
On Feb 3, 2000, Joe Buck <jbuck@synopsys.com> wrote:
> Use "$@" rather than $*.
I'd recommend `${1+"$@"}'. Some shells expand "$@" to a single empty
argument even when no arguments have been passed.
--
Alexandre Oliva http://www.ic.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
oliva@{lsd.ic.unicamp.br,guarana.{org,com}} aoliva@{acm,computer}.org
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
** I may forward mail about projects to mailing lists; please use them
^ permalink raw reply [flat|nested] 18+ messages in thread
[parent not found: <OFE65E91CB.007DAF79-ON8525701B.0062A53C-8525701B.00635711@us.ibm.com>]
* Re: GCC question
[not found] <OFE65E91CB.007DAF79-ON8525701B.0062A53C-8525701B.00635711@us.ibm.com>
@ 2005-06-10 13:34 ` Robert Bernecky
0 siblings, 0 replies; 18+ messages in thread
From: Robert Bernecky @ 2005-06-10 13:34 UTC (permalink / raw)
To: gcc, David Edelsohn
Thanks for your help, David,
Please accept my apologies for not asking the public forum.
I'll do that now...
GCCers, please fill me in on the roadmap and who is working in
this area.
Thanks and regards,
Robert
On Thu, 9 Jun 2005, David Edelsohn wrote:
> There are plans to implement loop fusion / array contraction in
> GCC based on the Tree-SSA data dependence analysis infrastructure now
> implemented in GCC. You need to ask the GCC community through the
> gcc@gcc.gnu.org mailinglist about the roadmap. A number of members of the
> GCC community are working on the problem, but each has his or her own
> priority and funding resources.
>
> You should ask these questions publicly, not contacting individual
> developers privately.
>
> David
>
> To: David Edelsohn/Watson/IBM@IBMUS
> cc:
> Subject: GCC question
>
>
>
> Hi, Dr. Edelsohn,
>
> I just read your Systems Journal article about GCC,
> and was wondering if you can answer a question
> about it for me:
>
> I see veiled references to loop fusion/array contraction in GCC on
> the web, but it looks like it only works for Fortran code.
> Also, a few simple experiments I've made with it seem to
> indicate that loop fusion is not performed by the compiler.
>
> So...
>
> 1. Are there plans to introduce loop fusion/array contraction
> into GCC?
>
> 2. If so, who would I contact in that regard?
>
> 3. If not, do you have any idea of the approximate difficulty
> of doing that in the post-SSA version of the compiler?
> If it's not onerous, I may be able to take on the job, as
> I otherwise have to introduce similar facilities into
> other compilers, and I'd rather do the job just once...
>
> The reason I'm doing this is that I'm working on array language
> compilers (APL, J, SAC), and these optimizations are key to
> getting acceptable run-time performance in those tongues.
>
> Thanks,
> Robert
>
>
>
>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: gcc question
@ 2003-05-24 13:55 John Anthony Kazos Jr.
0 siblings, 0 replies; 18+ messages in thread
From: John Anthony Kazos Jr. @ 2003-05-24 13:55 UTC (permalink / raw)
To: gcc
> Each time I compile and link my library source code, the compiler add
> the prefix lib to the compiled file name.
>
> Which is the option that I need to pass to gcc to tell the
> compiler/linker not to add the prefix lib at the beginning of the linked
> file ?
I'm interested in the answer to this question, as well. I'd also like to
know if there's a way to adjust existing programs. For example, running
ldd() on an executable shows me a reference to "/lib/ld-linux.so.2", and
I'd like that to be a reference simply to "ld-linux" so it will
automatically find the ld-linux.so file.
If I'm misunderstanding how it works, and it really does need a full path
(which is stupid, but oh well), then I'd like to be able to change it to a
reference to "/some/where/ld-linux.so".
^ permalink raw reply [flat|nested] 18+ messages in thread
* gcc question
@ 2003-05-23 20:12 Michel Cunha
0 siblings, 0 replies; 18+ messages in thread
From: Michel Cunha @ 2003-05-23 20:12 UTC (permalink / raw)
To: gcc
Each time I compile and link my library source code, the compiler add
the prefix lib to the compiled file name.
Which is the option that I need to pass to gcc to tell the
compiler/linker not to add the prefix lib at the beginning of the linked
file ?
--
Regards,
Michel Cunha
Software Developer
Callisto Media Systems, Inc
490 St. Joseph Boulevard, Suite 402
Hull (Quebec)
J8Y 3Y7
Canada
Tel: +1-819-770-5738, ext 107
Fax: +1-819-770-3998
Email: MCunha@Callisto.ca
Web: www.callisto.ca
^ permalink raw reply [flat|nested] 18+ messages in thread
* gcc question
@ 2003-03-27 19:07 Rick Albright
0 siblings, 0 replies; 18+ messages in thread
From: Rick Albright @ 2003-03-27 19:07 UTC (permalink / raw)
To: gcc
Hello,
I'm trying to compile a program using gcc, and I get the following message:
gcc:installation problem, cannot exec `cpp': No such file or directory
cpp is loaded (/usr/ccs/lib). I'm using a Sun workstation SunOS 5.7. Can you
provide me some information on figuring out what I need to do to get this
working.
Thank you,
Rick Albright
****************************************
Rick Albright
NEC Solutions (America), Inc.
Phone: (215) 627-7510
Fax: (215) 627-7515
Cell: (717) 471-2731
Email: RickAlbright@msn.com
rick.albright@necsam.com
****************************************
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: gcc question
@ 2002-01-06 8:25 dewar
0 siblings, 0 replies; 18+ messages in thread
From: dewar @ 2002-01-06 8:25 UTC (permalink / raw)
To: gcc, thesbman
<<Do you know where I can find a version of gcc that runs on an x86 machine
but can compile a program for a powerpc machine?
steven blakeslee
>>
I know of at least 8 ports of gcc for the x86, and at least 3 for the power pc,
and I am sure there are more I don't know of. Which of the 24 crosses are
you talking about?
^ permalink raw reply [flat|nested] 18+ messages in thread
* gcc question
@ 2002-01-06 7:06 steven blakeslee
2002-01-06 8:27 ` Jeff Sturm
0 siblings, 1 reply; 18+ messages in thread
From: steven blakeslee @ 2002-01-06 7:06 UTC (permalink / raw)
To: gcc
Do you know where I can find a version of gcc that runs on an x86 machine
but can compile a program for a powerpc machine?
steven blakeslee
_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com
^ permalink raw reply [flat|nested] 18+ messages in thread
* GCC question.
@ 2001-08-24 8:35 Stephen Jones
2001-08-24 17:16 ` Joern Rennecke
0 siblings, 1 reply; 18+ messages in thread
From: Stephen Jones @ 2001-08-24 8:35 UTC (permalink / raw)
To: Stephen.Jones, gcc, stephen.clarke
I have a question to ask about an example of the combination phase on some RTL.
The target has 64-bit integer registers and I wish to perform zero extension
from HI to DI using an "and" operation with a bit-mask of 0xffff. However, the
current method of zero extension seems to benefit from an extra combination
under certain circumstances which the masking version seems to miss.
Given the following RTL (paraphrasing for brevity):
: : : : :
(set (reg:SI 168) (subreg:SI (reg/v:DI 160) 0)) (expr_list:REG_DEAD (reg/v:DI
160)
(set (reg:SI 167) (plus:SI (reg:SI 168) (const_int 1 [0x1]))
(expr_list:REG_DEAD (reg:SI 168)(expr_list:REG_EQUAL (plus:SI (subreg:SI
(reg/v:DI 160) 0) (const_int 1 [0x1])
(set (reg/v:DI 160) (zero_extend:DI (subreg:HI (reg:SI 167) 0)))
(expr_list:REG_DEAD (reg:SI 167)
: : : : :
The combiner spots that it can perform the "plus" directly in DI mode because
the top 32 (actually 48) bits are going to be thrown away, then remove the
first subreg set, which saves a move instruction as it turns out.
However, given *functionally* equivalent RTL:
: : : : :
(set (reg:SI 168) (subreg:SI (reg/v:DI 160) 0)) (expr_list:REG_DEAD (reg/v:DI
160)
(set (reg:SI 167) (plus:SI (reg:SI 168) (const_int 1 [0x1]))
(expr_list:REG_DEAD (reg:SI 168)(expr_list:REG_EQUAL (plus:SI (subreg:SI
(reg/v:DI 160) 0) (const_int 1 [0x1])
(set (reg/v:DI 160) (and:DI (subreg:HI (reg:SI 167) 0) (reg:DI 170))
(expr_list:REG_DEAD (reg_SI 167) (expr_list:REG_EQUAL (zero_extend:DI
(subreg:HI (reg:SI 167) 0)
: : : : :
The combiner doesn't spot the optimisation. The reg:DI 170 contains the 0xffff,
which the compiler should know as it just put it there! Also, the REG_EQUAL
note shows that the discarding of the top 48 bits could also be considered.
So my question is:
i) What is stopping the combination in the second case?
ii) Is there in fact some standard way of doing this masking operation which
would not incur this problem?
Many thanks,
- Steve.
--
- Stephen Jones -
ST Microelectronics, Almondsbury, Bristol, United Kingdom.
.(2430 Aztec Park West -- Software Dept).
Tel/VM (+44)(1454) 462388.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: GCC question.
2001-08-24 8:35 GCC question Stephen Jones
@ 2001-08-24 17:16 ` Joern Rennecke
0 siblings, 0 replies; 18+ messages in thread
From: Joern Rennecke @ 2001-08-24 17:16 UTC (permalink / raw)
To: Stephen Jones; +Cc: Stephen.Jones, gcc, stephen.clarke
> The combiner doesn't spot the optimisation. The reg:DI 170 contains the 0xffff,
> which the compiler should know as it just put it there! Also, the REG_EQUAL
> note shows that the discarding of the top 48 bits could also be considered.
>
> So my question is:
> i) What is stopping the combination in the second case?
Combine can only handle up to three instructions at a time.
And it does not consider take advantage of REG_EQUAL notes.
> ii) Is there in fact some standard way of doing this masking operation which
> would not incur this problem?
No, but there are two nonstandard ways: you could use a clobber in the
insn pattern and a post-reload splitter, or a peephole2 pattern.
^ permalink raw reply [flat|nested] 18+ messages in thread
* GCC Question
@ 2001-04-12 13:01 gdunlap
0 siblings, 0 replies; 18+ messages in thread
From: gdunlap @ 2001-04-12 13:01 UTC (permalink / raw)
To: gcc
Hi,
I was unable to find on your web page weather or not GCC produces
the Abstract Syntax Tree of the code and if there is a way to have the
AST sent to the screen if you give the appropriate command line option.
Thanks,
Greg Dunlap
gdunlap@memphis.edu
^ permalink raw reply [flat|nested] 18+ messages in thread
* gcc Question
@ 2000-06-19 8:44 LINTNER, MITCHELL (SBCSI)
2000-06-19 9:57 ` Tim Prince
0 siblings, 1 reply; 18+ messages in thread
From: LINTNER, MITCHELL (SBCSI) @ 2000-06-19 8:44 UTC (permalink / raw)
To: 'gcc@gcc.gnu.org'
I apologize for this question. My goal is to compile Perl on an HP running
version 10.20. I have downloaded what I thought was binaries for gcc. I was
assuming that this would be just a load and go operation. Now that I have it
downloaded and unzipped/untarred, I'm lost. What is my next step. I have
never done this before. I have always worked where I had good unix support
who did this for me.
Thanks,
Mitch
Mitch Lintner
SBC Services, Inc. supporting SBC Wireless
2180 N Glenville Dr.
Richardson, Texas, 75082
Phone: 972-470-8107
Email: mitchell.lintner@sbc.com
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: gcc Question
2000-06-19 8:44 gcc Question LINTNER, MITCHELL (SBCSI)
@ 2000-06-19 9:57 ` Tim Prince
0 siblings, 0 replies; 18+ messages in thread
From: Tim Prince @ 2000-06-19 9:57 UTC (permalink / raw)
To: LINTNER, MITCHELL (SBCSI), gcc
Since the binary download sites are not supported directly by the gcc
effort, specific questions may have to go to the administrator of the
site you chose. In general, you must install both binutils and gcc. If
you do succeed in installing a binary which is out of date ( earlier
than gcc-2.95.2) you will need to rebuild from source anyway. The gcc
site includes instructions for the case where you have the optional HPUX
C development system; it is possible also to work from the default HPUX
compiler.
Tim Prince
----- Original Message -----
From: "LINTNER, MITCHELL (SBCSI)" <ML7354@txmail.sbc.com>
To: <gcc@gcc.gnu.org>
Sent: Monday, June 19, 2000 8:24 AM
Subject: gcc Question
> I apologize for this question. My goal is to compile Perl on an HP
running
> version 10.20. I have downloaded what I thought was binaries for gcc.
I was
> assuming that this would be just a load and go operation. Now that I
have it
> downloaded and unzipped/untarred, I'm lost. What is my next step. I
have
> never done this before. I have always worked where I had good unix
support
> who did this for me.
>
> Thanks,
>
> Mitch
>
> Mitch Lintner
>
> SBC Services, Inc. supporting SBC Wireless
> 2180 N Glenville Dr.
> Richardson, Texas, 75082
> Phone: 972-470-8107
> Email: mitchell.lintner@sbc.com
>
>
^ permalink raw reply [flat|nested] 18+ messages in thread
* gcc question
@ 2000-02-01 23:25 Sang-Kil Lee
2000-02-01 23:45 ` Alexandre Oliva
0 siblings, 1 reply; 18+ messages in thread
From: Sang-Kil Lee @ 2000-02-01 23:25 UTC (permalink / raw)
To: gcc
Hello,
I have a question.
I wrote a simple C program and then compiled it using gcc with an option
'-g' got a binary code.
I ran it and it finished successfully but didn't invoke a debugger(ex.
gdb).
Of course, I know that I can invoke the binary code using gdb(ex.
unix_prompt> gdb <binary_code>).
But what I want is that the debugger is invoked as soon as I run the
binary code.
Is it possible to attach the debugger to the binary code? If so, Please
let me know a method.
Regards,
Sang-Kil
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: gcc question
2000-02-01 23:25 gcc question Sang-Kil Lee
@ 2000-02-01 23:45 ` Alexandre Oliva
2000-02-02 12:31 ` Martin v. Loewis
0 siblings, 1 reply; 18+ messages in thread
From: Alexandre Oliva @ 2000-02-01 23:45 UTC (permalink / raw)
To: sklee; +Cc: gcc
On Feb 2, 2000, Sang-Kil Lee <sklee@synopsys.COM> wrote:
> I ran it and it finished successfully but didn't invoke a debugger(ex.
> gdb).
It's not supposed to. `-g' just tells the compiler to add debugging
information to the program.
> Of course, I know that I can invoke the binary code using gdb(ex.
> unix_prompt> gdb <binary_code>).
That's what you'll have to do.
> But what I want is that the debugger is invoked as soon as I run the
> binary code.
> Is it possible to attach the debugger to the binary code?
Well, it *is* possible to do, but you don't really want to do that.
You'd have to fork() the process right in the beginning of main(),
execlp("gdb", argv[0], pid_of_other_process, NULL) in one of the
processes and kill(getpid(), SIGSTOP) in the other, so that it waits
for gdb to attach to it. pid_of_other_process is the result of
converting the pid of the other process to a string.
--
Alexandre Oliva http://www.ic.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
oliva@{lsd.ic.unicamp.br,guarana.{org,com}} aoliva@{acm,computer}.org
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
** I may forward mail about projects to mailing lists; please use them
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: gcc question
2000-02-01 23:45 ` Alexandre Oliva
@ 2000-02-02 12:31 ` Martin v. Loewis
2000-02-02 12:52 ` Alexandre Oliva
0 siblings, 1 reply; 18+ messages in thread
From: Martin v. Loewis @ 2000-02-02 12:31 UTC (permalink / raw)
To: oliva; +Cc: sklee, gcc
> > Of course, I know that I can invoke the binary code using gdb(ex.
> > unix_prompt> gdb <binary_code>).
>
> That's what you'll have to do.
If the binary is not normally started from a unix prompt, but from
some other program, you can arrange to start gdb by providing a
wrapper shell script, eg put into prog
#! /bin/sh
gdb prog.orig
If you have X11 running, the wrapper ideally invokes xterm:
#! /bin/sh
echo $* >/tmp/prog.cmdline
xterm -e gdb prog.orig
Before invoking the run command, you would look into /tmp/prog.cmdline
to see what arguments where passed.
Hope this helps,
Martin
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: gcc question
2000-02-02 12:31 ` Martin v. Loewis
@ 2000-02-02 12:52 ` Alexandre Oliva
0 siblings, 0 replies; 18+ messages in thread
From: Alexandre Oliva @ 2000-02-02 12:52 UTC (permalink / raw)
To: Martin v. Loewis; +Cc: sklee, gcc
[-- Attachment #1: Type: text/plain, Size: 310 bytes --]
On Feb 2, 2000, "Martin v. Loewis" <martin@loewis.home.cs.tu-berlin.de> wrote:
> If you have X11 running, the wrapper ideally invokes xterm:
Good idea. That reminded me of a shell script I have written some
time ago, that may be useful for others, even though it's not likely
to solve Sang-Kil's problem:
[-- Attachment #2: debug --]
[-- Type: text/x-shellscript, Size: 1606 bytes --]
#! /bin/sh
# Copyright (C) 1999 Free Software Foundation
# This script is Free Software, and it can be copied, distributed and
# modified as defined in the GNU General Public License. A copy of
# its license can be downloaded from http://www.gnu.org/copyleft/gpl.html
# by Alexandre Oliva <oliva@lsd.ic.unicamp.br>
if test $# -lt 1; then
echo usage: env DEBUG="<gdb|emacs>" $0 "<program>" args... >&2
exit 1
fi
: ${DEBUG=gdb}
prog="$1"; shift 1
gdbinitdir=/tmp/.gdbinit.$$
gdbinit=$gdbinitdir/init
mkdir $gdbinitdir ||
{ echo directory $gdbinitdir already exists >&2; exit 1; }
{
echo "shell rm -rf /tmp/.gdbinit.$$"
echo "cd `pwd`"
echo "set args $*"
} >$gdbinit
case `"$DEBUG" --version </dev/null 2>/dev/null` in
"GDB"*|"GNU gdb"*)
# start command-line gdb within the correct working directory,
# and set up the specified argument list
exec "$DEBUG" -command $gdbinit $prog;;
"DDD"*)
# start DDD/gdb within the correct working directory,
# and set up the specified argument list
exec "$DEBUG" --debugger "${GDB-gdb} -command $gdbinit" $prog;;
"GNU Emacs"*)
# start gdb within GNU Emacs, move into the current working
# directory and set up the specified argument list
exec "$DEBUG" -eval "(progn (gdb \"gdb $prog\") (gud-call \"source $gdbinit\"))";;
XEmacs*)
# start gdb within XEmacs, move into the current working
# directory and set up the specified argument list
exec "$DEBUG" -eval "(progn (gdb \"$prog\") (gdb-call \"source $gdbinit\"))";;
*) echo you must set DEBUG to either emacs or gdb >&2;;
esac
rm -rf /tmp/.gdbinit.$$
exit 1
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2005-06-10 13:34 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <200002032057.MAA15624@yamato.synopsys.com>
2000-02-03 16:13 ` gcc question Joe Buck
2000-02-06 19:26 ` Alexandre Oliva
[not found] <OFE65E91CB.007DAF79-ON8525701B.0062A53C-8525701B.00635711@us.ibm.com>
2005-06-10 13:34 ` GCC question Robert Bernecky
2003-05-24 13:55 gcc question John Anthony Kazos Jr.
-- strict thread matches above, loose matches on Subject: below --
2003-05-23 20:12 Michel Cunha
2003-03-27 19:07 Rick Albright
2002-01-06 8:25 dewar
2002-01-06 7:06 steven blakeslee
2002-01-06 8:27 ` Jeff Sturm
2001-08-24 8:35 GCC question Stephen Jones
2001-08-24 17:16 ` Joern Rennecke
2001-04-12 13:01 GCC Question gdunlap
2000-06-19 8:44 gcc Question LINTNER, MITCHELL (SBCSI)
2000-06-19 9:57 ` Tim Prince
2000-02-01 23:25 gcc question Sang-Kil Lee
2000-02-01 23:45 ` Alexandre Oliva
2000-02-02 12:31 ` Martin v. Loewis
2000-02-02 12:52 ` Alexandre Oliva
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).