{"id":695,"date":"2012-04-14T15:00:32","date_gmt":"2012-04-14T15:00:32","guid":{"rendered":"http:\/\/joelinoff.com\/blog\/?p=695"},"modified":"2012-04-14T15:28:00","modified_gmt":"2012-04-14T15:28:00","slug":"gcc-4-7-0-bash-install-script-updated-to-support-binutils-2-22","status":"publish","type":"post","link":"https:\/\/joelinoff.com\/blog\/?p=695","title":{"rendered":"gcc 4.7.0 bash install script updated to support binutils-2.22"},"content":{"rendered":"<p>This week I updated the gcc-4.7.0 bash install script to include binutils-2.22 with gold support enabled. See <a href=\"http:\/\/joelinoff.com\/blog\/?p=658\" title=\"gcc-4.7.0\">this<\/a> blog entry to download it.<br \/>\n<!--more--><br \/>\nI found a number of type-casting problems in the code so to get it to work I had to set the &#8211;disable-werror option in the configuration. <\/p>\n<p>There was one serious coding problem in the parse_uint function at line 196 in the gold\/options.cc file. The logic is testing [crayon lang=&#8221;C++&#8221; inline=&#8221;true&#8221;]retval<0[\/crayon] instead of [crayon lang=\"C++\" inline=\"true\"]*retval<0[\/crayon]. Fortunately, this code does not seem to be used.\n\n[crayon lang=\"C++\" toolbar=\"always\" title=\"CODE\"]\nvoid\nparse_uint(const char* option_name, const char* arg, int* retval)\n{\n  char* endptr;\n  *retval = strtol(arg, &#038;endptr, 0);\n  if (*endptr != '\\0' || retval < 0) \/\/ should be *retval<0\n    gold_fatal(_(\"%s: invalid option value (expected an integer): %s\"),\n               option_name, arg);\n}\n[\/crayon]\n\n\n<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This week I updated the gcc-4.7.0 bash install script to include binutils-2.22 with gold support enabled. See this blog entry to download it.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[15,5,16],"tags":[],"_links":{"self":[{"href":"https:\/\/joelinoff.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/695"}],"collection":[{"href":"https:\/\/joelinoff.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/joelinoff.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/joelinoff.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/joelinoff.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=695"}],"version-history":[{"count":5,"href":"https:\/\/joelinoff.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/695\/revisions"}],"predecessor-version":[{"id":705,"href":"https:\/\/joelinoff.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/695\/revisions\/705"}],"wp:attachment":[{"href":"https:\/\/joelinoff.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=695"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/joelinoff.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=695"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/joelinoff.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=695"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}