public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "richard_sharman at mitel dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/47739] New: gcc 4.4.5 with target powerpc-wrs-vxworks fails to compile Date: Mon, 14 Feb 2011 21:52:00 -0000 [thread overview] Message-ID: <bug-47739-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47739 Summary: gcc 4.4.5 with target powerpc-wrs-vxworks fails to compile Product: gcc Version: 4.4.5 Status: UNCONFIRMED Severity: minor Priority: P3 Component: target AssignedTo: unassigned@gcc.gnu.org ReportedBy: richard_sharman@mitel.com When building a cross compiler for powerpc-wrs-vxworks some files failed to compile. The config used was ../configure \ --target=powerpc-wrs-vxworks \ --disable-multilib --with-endian=big \ --enable-languages="c,c++" \ -with-headers=$WIND_BASE/target/h \ --disable-multilib \ --enable-threads=vxworks There were 3 problems: * the vxworks include files for `open' require 3 parameters. * there is no `access' functions in vxworks's unistd.h * the vxworks mkdir only accepts 1 parameter. I made the following changes to make the files compile. For the changes to open I didn't know what to #ifdef the code on so I just added an extra parameter of 0. The changes for acesss/mkdir were easier because F_OK is not defined in the vxworks header. Here is the context diff: === patch starts here *** ./libssp/ssp.c.orig Thu Apr 9 19:23:07 2009 --- ./libssp/ssp.c Wed Feb 9 11:14:08 2011 *************** *** 72,78 **** if (__stack_chk_guard != 0) return; ! fd = open ("/dev/urandom", O_RDONLY); if (fd != -1) { ssize_t size = read (fd, &__stack_chk_guard, --- 72,78 ---- if (__stack_chk_guard != 0) return; ! fd = open ("/dev/urandom", O_RDONLY, 0); if (fd != -1) { ssize_t size = read (fd, &__stack_chk_guard, *************** *** 102,108 **** /* Print error message directly to the tty. This avoids Bad Things happening if stderr is redirected. */ ! fd = open (_PATH_TTY, O_WRONLY); if (fd != -1) { static const char msg2[] = " terminated\n"; --- 102,108 ---- /* Print error message directly to the tty. This avoids Bad Things happening if stderr is redirected. */ ! fd = open (_PATH_TTY, O_WRONLY, 0); if (fd != -1) { static const char msg2[] = " terminated\n"; *** ./gcc/libgcov.c.orig Thu Apr 9 19:23:07 2009 --- ./gcc/libgcov.c Wed Feb 9 11:12:17 2011 *************** *** 104,111 **** *s = '\0'; /* Try to make directory if it doesn't already exist. */ ! if (access (filename, F_OK) == -1 && mkdir (filename, 0755) == -1 /* The directory might have been made by another process. */ && errno != EEXIST) { --- 104,116 ---- *s = '\0'; /* Try to make directory if it doesn't already exist. */ ! if ( ! #ifdef F_OK ! access (filename, F_OK) == -1 && mkdir (filename, 0755) == -1 + #else + mkdir (filename) + #endif /* The directory might have been made by another process. */ && errno != EEXIST) { *** ./gcc/gcov-io.c.orig Wed Jun 25 20:25:08 2008 --- ./gcc/gcov-io.c Wed Feb 9 11:11:06 2011 *************** *** 83,89 **** #endif #if GCOV_LOCKED if (mode > 0) ! fd = open (name, O_RDWR); else fd = open (name, O_RDWR | O_CREAT, 0666); if (fd < 0) --- 83,89 ---- #endif #if GCOV_LOCKED if (mode > 0) ! fd = open (name, O_RDWR, 0); else fd = open (name, O_RDWR | O_CREAT, 0666); if (fd < 0) === patch ends here Richard
next reply other threads:[~2011-02-14 21:40 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-02-14 21:52 richard_sharman at mitel dot com [this message] 2011-06-08 12:50 ` [Bug target/47739] " jan.smets@alcatel-lucent.com 2013-11-10 5:38 ` pinskia at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-47739-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).