* [PATCH] fix darwin bootstrap
@ 2010-09-24 15:12 Jack Howarth
2010-09-24 17:37 ` Richard Guenther
0 siblings, 1 reply; 2+ messages in thread
From: Jack Howarth @ 2010-09-24 15:12 UTC (permalink / raw)
To: gcc-patches; +Cc: dominiq, mikestump, iains
The commit of r164532 broke the bootstrap on darwin in stage1
due to the incorrect passing to sizeof of a pointer to a struct
rather than the struct itself. The attached patch corrects this
error and restores the bootstrap on darwin. Bootstrap and
regression tested on x86_64-apple-darwin10. Okay for gcc trunk?
Jack
2010-09-23 Dominique Dhumieres <dominiq@lps.ens.fr>
Jack Howarth <howarth@bromo.med.uc.edu>
PR 45751/target
* gcc/config/darwin-driver.c: Pass struct to sizeof.
Index: gcc/config/darwin-driver.c
===================================================================
--- gcc/config/darwin-driver.c (revision 164573)
+++ gcc/config/darwin-driver.c (working copy)
@@ -76,7 +76,7 @@
generate_option (OPT_mmacosx_version_min_, macosx_deployment_target,
1, CL_DRIVER, &(*decoded_options)[1]);
memcpy (*decoded_options + 2, argv + 1,
- (argc - 1) * sizeof (struct cl_decoded_option *));
+ (argc - 1) * sizeof (struct cl_decoded_option));
return;
}
}
@@ -128,7 +128,7 @@
generate_option (OPT_mmacosx_version_min_, new_flag,
1, CL_DRIVER, &(*decoded_options)[1]);
memcpy (*decoded_options + 2, argv + 1,
- (argc - 1) * sizeof (struct cl_decoded_option *));
+ (argc - 1) * sizeof (struct cl_decoded_option));
return;
parse_failed:
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] fix darwin bootstrap
2010-09-24 15:12 [PATCH] fix darwin bootstrap Jack Howarth
@ 2010-09-24 17:37 ` Richard Guenther
0 siblings, 0 replies; 2+ messages in thread
From: Richard Guenther @ 2010-09-24 17:37 UTC (permalink / raw)
To: Jack Howarth; +Cc: gcc-patches, dominiq, mikestump, iains
On Fri, Sep 24, 2010 at 2:40 AM, Jack Howarth <howarth@bromo.med.uc.edu> wrote:
> The commit of r164532 broke the bootstrap on darwin in stage1
> due to the incorrect passing to sizeof of a pointer to a struct
> rather than the struct itself. The attached patch corrects this
> error and restores the bootstrap on darwin. Bootstrap and
> regression tested on x86_64-apple-darwin10. Okay for gcc trunk?
> Jack
Looks obvious.
Thanks,
Richard.
> 2010-09-23 Dominique Dhumieres <dominiq@lps.ens.fr>
> Jack Howarth <howarth@bromo.med.uc.edu>
>
> PR 45751/target
>
> * gcc/config/darwin-driver.c: Pass struct to sizeof.
>
>
> Index: gcc/config/darwin-driver.c
> ===================================================================
> --- gcc/config/darwin-driver.c (revision 164573)
> +++ gcc/config/darwin-driver.c (working copy)
> @@ -76,7 +76,7 @@
> generate_option (OPT_mmacosx_version_min_, macosx_deployment_target,
> 1, CL_DRIVER, &(*decoded_options)[1]);
> memcpy (*decoded_options + 2, argv + 1,
> - (argc - 1) * sizeof (struct cl_decoded_option *));
> + (argc - 1) * sizeof (struct cl_decoded_option));
> return;
> }
> }
> @@ -128,7 +128,7 @@
> generate_option (OPT_mmacosx_version_min_, new_flag,
> 1, CL_DRIVER, &(*decoded_options)[1]);
> memcpy (*decoded_options + 2, argv + 1,
> - (argc - 1) * sizeof (struct cl_decoded_option *));
> + (argc - 1) * sizeof (struct cl_decoded_option));
> return;
>
> parse_failed:
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-09-24 8:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-24 15:12 [PATCH] fix darwin bootstrap Jack Howarth
2010-09-24 17:37 ` Richard Guenther
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).