{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":649252132,"defaultBranch":"master","name":"gcc","ownerLogin":"ahgamut","currentUserCanPush":false,"isFork":true,"isEmpty":false,"createdAt":"2023-06-04T09:20:08.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/41098605?v=4","public":true,"private":false,"isOrgOwned":false},"refInfo":{"name":"","listCacheKey":"v0:1707685236.0","currentOid":""},"activityList":{"items":[{"before":"d6b2544e444f53ea9934b4c368628144fc5d1a9b","after":"a0f232b87836da0ad75633f9a8dc79509fe89843","ref":"refs/heads/portcosmo-12.3","pushedAt":"2024-05-30T04:25:47.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"ahgamut","name":"Gautham","path":"/ahgamut","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/41098605?s=80&v=4"},"commit":{"message":"remove INCLUDE_STRING macro to fix build error\n\nthe INCLUDE_STRING macro causes a clash in the toupper functions between\nCosmopolitan Libc's libc/str, third_party/libcxx, and GCC's safe-ctype.h","shortMessageHtmlLink":"remove INCLUDE_STRING macro to fix build error"}},{"before":"5e387e1260ff55114f3f7a4666447061cd5118e1","after":"2f2e330a669d334ebc662dda74b29da959c217fe","ref":"refs/heads/portcosmo-11.2","pushedAt":"2024-05-21T20:53:54.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"ahgamut","name":"Gautham","path":"/ahgamut","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/41098605?s=80&v=4"},"commit":{"message":"avoid IDENTIFIER_NAME in struct initialization\n\nbefore this commit, we were using IDENTIFIER_NAME to properly re-create\nthe constructor for structs that were using magic constants. We were\nusing this to access the correct member of the structure by name, and\nfill in its initial value properly.\n\nHowever, C structs can contain anonymous unions as members, and we\ncannot access the union itself by name, because it doesn't have -- we\ncan only access the members of the union (which are called\nCONSTRUCTOR_ELT or TYPE_FIELDS in the gcc internals docs, depending on\nif its an initialization or in general) .\n\nThis detail caused an issue with the initialization of struct sigaction,\nwhich has an anonymous union as a member.\n\nThe current fix is to simply avoid using IDENTIFIER_NAME and use\nDECL_NAME instead; we don't need to lookup the struct member by its name\nduring the reconstruction process, we just need to get its\nIDENTIFIER_NODE somehow, because that is what is required by\nbuild_component_ref in the construction. (This should have been\nconsidered by comparing portcosmo_bcref with its C++ version, which is a\noneliner that does not involve any name lookups).\n\nThis fix avoids the compiler crash, as confirmed by the example in\nhttps://github.com/ahgamut/portcosmo-examples/commit/147ad1c6e0589ce573b7f57eda651df57ca0ddbf\nThe compiler successfully patches the struct with the correct values. It\nremains to be seen if the compiler can patch magic values added in the\nanonymous union.","shortMessageHtmlLink":"avoid IDENTIFIER_NAME in struct initialization"}},{"before":"e60bf3e3b397f04b3cf43ae6d9637f9cb501604f","after":"d6b2544e444f53ea9934b4c368628144fc5d1a9b","ref":"refs/heads/portcosmo-12.3","pushedAt":"2024-05-21T20:51:42.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"ahgamut","name":"Gautham","path":"/ahgamut","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/41098605?s=80&v=4"},"commit":{"message":"avoid IDENTIFIER_NAME in struct initialization\n\nbefore this commit, we were using IDENTIFIER_NAME to properly re-create\nthe constructor for structs that were using magic constants. We were\nusing this to access the correct member of the structure by name, and\nfill in its initial value properly.\n\nHowever, C structs can contain anonymous unions as members, and we\ncannot access the union itself by name, because it doesn't have -- we\ncan only access the members of the union (which are called\nCONSTRUCTOR_ELT or TYPE_FIELDS in the gcc internals docs, depending on\nif its an initialization or in general) .\n\nThis detail caused an issue with the initialization of struct sigaction,\nas seen in https://github.com/jart/cosmopolitan/issues/1183\n\nThe current fix is to simply avoid using IDENTIFIER_NAME and use\nDECL_NAME instead; we don't need to lookup the struct member by its name\nduring the reconstruction process, we just need to get its\nIDENTIFIER_NODE somehow, because that is what is required by\nbuild_component_ref in the construction. (This should have been\nconsidered by comparing portcosmo_bcref with its C++ version, which is a\noneliner that does not involve any name lookups).\n\nThis fix avoids the compiler crash, as confirmed by the example in\nhttps://github.com/ahgamut/portcosmo-examples/commit/147ad1c6e0589ce573b7f57eda651df57ca0ddbf\nThe compiler successfully patches the struct with the correct values. It\nremains to be seen if the compiler can patch magic values added in the\nanonymous union.","shortMessageHtmlLink":"avoid IDENTIFIER_NAME in struct initialization"}},{"before":null,"after":"e60bf3e3b397f04b3cf43ae6d9637f9cb501604f","ref":"refs/heads/portcosmo-12.3","pushedAt":"2024-02-11T21:00:36.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"ahgamut","name":"Gautham","path":"/ahgamut","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/41098605?s=80&v=4"},"commit":{"message":"update build config to target cosmo","shortMessageHtmlLink":"update build config to target cosmo"}},{"before":"2415024e0f81f8c09bf08f947c790b43de9d0bbc","after":"67d5b10e659c3f4c02b8af507c84d5e764e264b4","ref":"refs/heads/master","pushedAt":"2024-02-11T16:00:44.000Z","pushType":"push","commitsCount":7392,"pusher":{"login":"ahgamut","name":"Gautham","path":"/ahgamut","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/41098605?s=80&v=4"},"commit":{"message":"Daily bump.","shortMessageHtmlLink":"Daily bump."}},{"before":"e9e016eb980eeff42c5de7bd554d8479b6ad87d8","after":"5e387e1260ff55114f3f7a4666447061cd5118e1","ref":"refs/heads/portcosmo-11.2","pushedAt":"2023-11-25T05:28:49.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"ahgamut","name":"Gautham","path":"/ahgamut","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/41098605?s=80&v=4"},"commit":{"message":"fix error in initialization of global integers\n\nwhen the initstruct part of the plugin was originally added to this\npatch in 9be0310561c274, we only had the capability to handle\ninitializations like\n\n static struct c = {.a = O_DIRECT, .b = EINVAL};\n\nand we did not have the capability to handle patching arbitrary\nexpressions, which was added much later in commits 98a010e70a65c46\nand 14352d9819f672, which meant we could handle initializations like\n\n static struct c = {.a = O_DIRECT | O_NODELAY, .b = EINVAL};\n\nhowever, I did not update all parts of initstruct code to benefit from\nthis new capability. Specifically, I did not update the part of\ninitstruct that handled the initializations of global _integers_,\nalthough I did update the part for global structs, local structs, and\nlocal ints. (note the code before this commit had 3 calls of the\nfunction arg_should_be_unpatched, not 4).\n\nThus, a crash was found when trying to run the tests contained within\ngnutls-3.7.10, which had a global integer initialization like:\n\n int a = (O_DIRECT | O_NODELAY);\n\nThis commit fixes the error by calling arg_should_be_unpatched at the\nnecessary spot. A minimal example with the above line was tested, and\nnow the compiler doesn't segfault.","shortMessageHtmlLink":"fix error in initialization of global integers"}},{"before":"f4984a94c14e4b205679d68fbcc975f5735a4ba0","after":"e9e016eb980eeff42c5de7bd554d8479b6ad87d8","ref":"refs/heads/portcosmo-11.2","pushedAt":"2023-10-22T23:09:37.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"ahgamut","name":"Gautham","path":"/ahgamut","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/41098605?s=80&v=4"},"commit":{"message":"update README","shortMessageHtmlLink":"update README"}},{"before":"4ff3a6037e289c6422be256a3cda693d9dd21d1a","after":"f4984a94c14e4b205679d68fbcc975f5735a4ba0","ref":"refs/heads/portcosmo-11.2","pushedAt":"2023-10-12T21:58:07.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"ahgamut","name":"Gautham","path":"/ahgamut","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/41098605?s=80&v=4"},"commit":{"message":"add cosmo as a target","shortMessageHtmlLink":"add cosmo as a target"}},{"before":null,"after":"b6aaa1a5a12574e19258ae8d0c1a5d949631031d","ref":"refs/heads/exp-golang","pushedAt":"2023-09-28T07:42:55.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"ahgamut","name":"Gautham","path":"/ahgamut","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/41098605?s=80&v=4"},"commit":{"message":"golang fixes","shortMessageHtmlLink":"golang fixes"}},{"before":"c583ef7d39113ae96dc1dad9c0515302046ca888","after":"4ff3a6037e289c6422be256a3cda693d9dd21d1a","ref":"refs/heads/portcosmo-11.2","pushedAt":"2023-09-24T10:51:59.000Z","pushType":"push","commitsCount":2,"pusher":{"login":"ahgamut","name":"Gautham","path":"/ahgamut","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/41098605?s=80&v=4"},"commit":{"message":"remove __attribute__((fallthrough))\n\nswitch statements often have an __attribute__((fallthrough)) to avoid\nthe -Wimplicit-fallthrough warning. when rewriting the switch, we need\nto ensure these fallthrough statements are ignored.\n\nnote that fallthroughs, like breaks, are only checked within the\ntop-level of the switch, because, according to GCC online docs,\n__attribute__((fallthrough)) \"can only be used in a switch statement\n(the compiler will issue an error otherwise), after a preceding\nstatement and before a logically succeeding case label, or user-defined\nlabel.\"","shortMessageHtmlLink":"remove __attribute__((fallthrough))"}},{"before":"2f6402db9307ba1b6d27531c693dd6b934c55adc","after":"c583ef7d39113ae96dc1dad9c0515302046ca888","ref":"refs/heads/portcosmo-11.2","pushedAt":"2023-09-23T21:56:37.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"ahgamut","name":"Gautham","path":"/ahgamut","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/41098605?s=80&v=4"},"commit":{"message":"patch break statements more than one level deep\n\nwe had a simple loop that went over the body of the switch statement,\nthat looked to replace case labels and break statements with the\nappropriate goto statements.\n\nbut this was insufficient because some break statements could be hidden\nwithin a BIND_EXPR (a new scope is created in a case), so we wrote a\nnested loop to handle BIND_EXPR_BODY.\n\nbut this too turned out to be insufficient, because break statements\ncould be present in the body of an if statement as well (see\nsrc/extract.c in the source code of GNU tar). This means the a\nparticular case label inside a switch could have nested ifs and\nBIND_EXPR and then a valid break at the innermost of all these\nstatement.\n\nto handle breaks within arbitrary scopes/ifs, this commit changes the\ncode to perform case label replacement by walking through the body of\nthe switch statements, and the tree traversal ensures we can reach any\nbreak statement nested inside.","shortMessageHtmlLink":"patch break statements more than one level deep"}},{"before":"811a5a1e209c12c3ecfce78b4a5ee6b9bfc96ef9","after":"2f6402db9307ba1b6d27531c693dd6b934c55adc","ref":"refs/heads/portcosmo-11.2","pushedAt":"2023-09-23T01:18:54.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"ahgamut","name":"Gautham","path":"/ahgamut","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/41098605?s=80&v=4"},"commit":{"message":"add patches from musl-cross-make\n\nhttps://github.com/richfelker/musl-cross-make\nall the patches from patches/gcc-11.2.0","shortMessageHtmlLink":"add patches from musl-cross-make"}},{"before":"d55f07f5dcab4b4ea97aa7278c4432f9db150b70","after":"811a5a1e209c12c3ecfce78b4a5ee6b9bfc96ef9","ref":"refs/heads/portcosmo-11.2","pushedAt":"2023-09-22T04:25:02.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"ahgamut","name":"Gautham","path":"/ahgamut","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/41098605?s=80&v=4"},"commit":{"message":"skip tm-texi because it breaks","shortMessageHtmlLink":"skip tm-texi because it breaks"}},{"before":"0464cbb8db4e1dbb463f903f24060c5569da3218","after":"d55f07f5dcab4b4ea97aa7278c4432f9db150b70","ref":"refs/heads/portcosmo-11.2","pushedAt":"2023-09-21T17:46:10.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"ahgamut","name":"Gautham","path":"/ahgamut","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/41098605?s=80&v=4"},"commit":{"message":"disable arm neon in libcpp","shortMessageHtmlLink":"disable arm neon in libcpp"}},{"before":"d458fa3b560e6315cc0c3c2b00207a429f70cffa","after":"0464cbb8db4e1dbb463f903f24060c5569da3218","ref":"refs/heads/portcosmo-11.2","pushedAt":"2023-09-21T16:56:32.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"ahgamut","name":"Gautham","path":"/ahgamut","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/41098605?s=80&v=4"},"commit":{"message":"add stdio for mpfr also","shortMessageHtmlLink":"add stdio for mpfr also"}},{"before":"db538ca46bc3125d2201b8b1868e2f0c7333a544","after":"d458fa3b560e6315cc0c3c2b00207a429f70cffa","ref":"refs/heads/portcosmo-11.2","pushedAt":"2023-09-21T15:59:52.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"ahgamut","name":"Gautham","path":"/ahgamut","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/41098605?s=80&v=4"},"commit":{"message":"stdio.h just in case for mpc","shortMessageHtmlLink":"stdio.h just in case for mpc"}},{"before":"3d56c4eca9ca6a3782f0b4795400e02cb1c30af7","after":"db538ca46bc3125d2201b8b1868e2f0c7333a544","ref":"refs/heads/portcosmo-11.2","pushedAt":"2023-09-02T18:20:30.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"ahgamut","name":"Gautham","path":"/ahgamut","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/41098605?s=80&v=4"},"commit":{"message":"disable Wformat by default","shortMessageHtmlLink":"disable Wformat by default"}},{"before":"d74760e89f650a5d514e7dbeedd23f84c275dd0f","after":"3d56c4eca9ca6a3782f0b4795400e02cb1c30af7","ref":"refs/heads/portcosmo-11.2","pushedAt":"2023-07-02T07:25:38.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"ahgamut","name":"Gautham","path":"/ahgamut","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/41098605?s=80&v=4"},"commit":{"message":"remove some comments","shortMessageHtmlLink":"remove some comments"}},{"before":"aee983b02f070c7f3ce986696ccf15d68ee5051d","after":"d74760e89f650a5d514e7dbeedd23f84c275dd0f","ref":"refs/heads/portcosmo-11.2","pushedAt":"2023-07-02T07:01:54.000Z","pushType":"push","commitsCount":2,"pusher":{"login":"ahgamut","name":"Gautham","path":"/ahgamut","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/41098605?s=80&v=4"},"commit":{"message":"remove SubstType\n\nwe never used it anyway","shortMessageHtmlLink":"remove SubstType"}},{"before":"18736cfc1d50365db96ec8e57037f8e2fd26001f","after":"aee983b02f070c7f3ce986696ccf15d68ee5051d","ref":"refs/heads/portcosmo-11.2","pushedAt":"2023-07-02T04:25:27.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"ahgamut","name":"Gautham","path":"/ahgamut","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/41098605?s=80&v=4"},"commit":{"message":"add back gcc README for musl-cross-make","shortMessageHtmlLink":"add back gcc README for musl-cross-make"}},{"before":"14352d9819f67200990bc4526a0b14bad2dc026e","after":"18736cfc1d50365db96ec8e57037f8e2fd26001f","ref":"refs/heads/portcosmo-11.2","pushedAt":"2023-06-30T03:46:14.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"ahgamut","name":"Gautham","path":"/ahgamut","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/41098605?s=80&v=4"},"commit":{"message":"add README","shortMessageHtmlLink":"add README"}},{"before":"5f1b1d2f5e99a5f20ccb127b2d46774aef1baf5a","after":"14352d9819f67200990bc4526a0b14bad2dc026e","ref":"refs/heads/portcosmo-11.2","pushedAt":"2023-06-30T02:53:11.000Z","pushType":"push","commitsCount":2,"pusher":{"login":"ahgamut","name":"Gautham","path":"/ahgamut","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/41098605?s=80&v=4"},"commit":{"message":"allow storing __tmpcosmo_ temporary macros\n\nso now both ways are available","shortMessageHtmlLink":"allow storing __tmpcosmo_ temporary macros"}},{"before":"98a010e70a65c46d0fa914bf38d13526d6723936","after":"14352d9819f67200990bc4526a0b14bad2dc026e","ref":"refs/heads/without-tmps","pushedAt":"2023-06-11T06:47:42.413Z","pushType":"push","commitsCount":1,"pusher":{"login":"ahgamut","name":"Gautham","path":"/ahgamut","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/41098605?s=80&v=4"},"commit":{"message":"allow storing __tmpcosmo_ temporary macros\n\nso now both ways are available","shortMessageHtmlLink":"allow storing __tmpcosmo_ temporary macros"}},{"before":null,"after":"98a010e70a65c46d0fa914bf38d13526d6723936","ref":"refs/heads/without-tmps","pushedAt":"2023-06-09T02:54:31.519Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"ahgamut","name":"Gautham","path":"/ahgamut","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/41098605?s=80&v=4"},"commit":{"message":"enable AST rewrite WITHOUT using temporaries\n\nearlier, to perform the AST rewriting, we needed temporary constants of\nthe type __tmpcosmo_EINVAL to be available (either as static const or as\na #define) so that we could later use the temporary values and the\nlocation of the substitution to figure out what actual values to put\nthere. with this commit, we no longer need to do that! here's what\nhappens:\n\nlet's assume the non-constant error is raised at a switch-case or\ninitializer, which contains the expression E. here's what we now do:\n\n- if E is a VAR_DECL, we search for it/add it to the hashmap and\n business goes on as earlier\n- if E can be simplified to a VAR_DECL, we do the same as above\n- if E is a complicated expression, we add a NEW UNIQUE ENTRY to the\n hash table, corresponding to just that constant expression\n\nThat's it! when doing the unpatching later, there is a unique temporary\ninteger assigned to each VAR_DECL and arbitrary expression that we\nfound, so we use that integer to figure out what to do.\n\nthis can still explode for int/short types, but otherwise it seems to be\nsolid.","shortMessageHtmlLink":"enable AST rewrite WITHOUT using temporaries"}},{"before":"521f381486b109ae55a5204357c179407ee5f805","after":"5f1b1d2f5e99a5f20ccb127b2d46774aef1baf5a","ref":"refs/heads/portcosmo-11.2","pushedAt":"2023-06-08T21:27:07.086Z","pushType":"push","commitsCount":1,"pusher":{"login":"ahgamut","name":"Gautham","path":"/ahgamut","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/41098605?s=80&v=4"},"commit":{"message":"added warning for missing __tmpcosmo_\n\nnow, if we are unable to find a temporary constant for a particular\nvariable, we will inform the user about that\n\n- also fixed a STUPID error with initstruct, we only need to patch\n VAR_DECLs, not anything with initstruct\n- also allowed CONVERT_EXPRs to be used in substitutions","shortMessageHtmlLink":"added warning for missing __tmpcosmo_"}},{"before":"54eb7f9153618d4ca33eef632a23f49afbc11f68","after":"521f381486b109ae55a5204357c179407ee5f805","ref":"refs/heads/portcosmo-11.2","pushedAt":"2023-06-08T18:39:22.602Z","pushType":"push","commitsCount":2,"pusher":{"login":"ahgamut","name":"Gautham","path":"/ahgamut","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/41098605?s=80&v=4"},"commit":{"message":"remove some commented code","shortMessageHtmlLink":"remove some commented code"}},{"before":"ebef3cad2f02d4e5b26ae51db8cc84c9827b6f80","after":"54eb7f9153618d4ca33eef632a23f49afbc11f68","ref":"refs/heads/portcosmo-11.2","pushedAt":"2023-06-06T05:52:53.946Z","pushType":"push","commitsCount":1,"pusher":{"login":"ahgamut","name":"Gautham","path":"/ahgamut","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/41098605?s=80&v=4"},"commit":{"message":"ensuring that the temporary is removed","shortMessageHtmlLink":"ensuring that the temporary is removed"}},{"before":"38c921a966dca8368d654716b67cb6240120bed5","after":"ebef3cad2f02d4e5b26ae51db8cc84c9827b6f80","ref":"refs/heads/portcosmo-11.2","pushedAt":"2023-06-06T05:38:14.060Z","pushType":"push","commitsCount":1,"pusher":{"login":"ahgamut","name":"Gautham","path":"/ahgamut","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/41098605?s=80&v=4"},"commit":{"message":"switch off usage of the temporary constant\n\nnot sure what will happen if someone manually forces the use of the\ntemporary constant, but I expect this should make the linker remove it.","shortMessageHtmlLink":"switch off usage of the temporary constant"}},{"before":null,"after":"38c921a966dca8368d654716b67cb6240120bed5","ref":"refs/heads/portcosmo-11.2","pushedAt":"2023-06-05T03:33:23.084Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"ahgamut","name":"Gautham","path":"/ahgamut","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/41098605?s=80&v=4"},"commit":{"message":"switch off debug printing","shortMessageHtmlLink":"switch off debug printing"}}],"hasNextPage":false,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"cursor":"djE6ks8AAAAEV5pcdQA","startCursor":null,"endCursor":null}},"title":"Activity ยท ahgamut/gcc"}