From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 60718 invoked by alias); 1 Jan 2018 21:03:52 -0000 Mailing-List: contact java-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-owner@gcc.gnu.org Received: (qmail 60709 invoked by uid 89); 1 Jan 2018 21:03:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=2.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_MESSAGE,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.2 spammy=jones, Jones, Greetings, crude X-HELO: mail-wm0-f65.google.com Received: from mail-wm0-f65.google.com (HELO mail-wm0-f65.google.com) (74.125.82.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 01 Jan 2018 21:03:50 +0000 Received: by mail-wm0-f65.google.com with SMTP id n138so58434808wmg.2 for ; Mon, 01 Jan 2018 13:03:49 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=m6UNF8/8rG1hxnF2F7GCtb6lSrynOU3AQAfr8QQ04MA=; b=hgRw4XHtVq9uwOFrzQGXUFlQdHoCAKYjSyKYYWPkTfNhQ1yNSM5KR9RVJ8ZMmU3Uzs 7bMUuZiWGRelaT44mHlFdy+P4QuTvYbp6i6v67a6v0yllfsFsOrqSUnseL5+GALGgQBV En50Kr1F72MaH0U+mNmIPDqhgashjnjki3ELHL7jIm1y29CV7c2DNYlHWrS166smHHh3 UTFrGettsCreQC4jnElgYjZi9aDamVnBdLAb5zME5+EAd6obc8AreH52u8xm46uuFc5m WFdeK1WctYRvGuDm+pOILApYUm0Nr3GO1MF9Ul2bMQDbSh4rxL6SQ4cGZhLDFd8zlSKB qmVA== X-Gm-Message-State: AKGB3mLAm9TUD8Tk8XH5T2LuDuC+hWA407DSEQ8c24MI07Xv+Y51vtSN g4F8xFuOpk/Wl2xvsv5zEEc7C6rJK3BrNR1BN8E= X-Google-Smtp-Source: ACJfBovozyzR5j4v519/6WEELhh/e6UPhF83iRQrtaKvSEuiO7hK8U9gfeQDCTtj2XH2KWzK3auTZu4NApSrQmtszgo= X-Received: by 10.28.187.133 with SMTP id l127mr31971056wmf.128.1514840628096; Mon, 01 Jan 2018 13:03:48 -0800 (PST) MIME-Version: 1.0 Received: by 10.223.169.227 with HTTP; Mon, 1 Jan 2018 13:03:47 -0800 (PST) In-Reply-To: <3BC75108-7D53-4CCB-AFEF-51C8EC98F9B3@gmail.com> References: <3BC75108-7D53-4CCB-AFEF-51C8EC98F9B3@gmail.com> From: Yale Zhang Date: Mon, 01 Jan 2018 21:03:00 -0000 Message-ID: Subject: Re: add support for x86_64-w64-mingw32 and cut the fat from libgcj To: Brian Jones Cc: java@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2018-01/txt/msg00003.txt.bz2 Alright, I've submitted my request & patch to bugzilla: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83647 "Having said that, I'm quite happy to accept mingw patches if there is a live branch to apply them to." Under the target version, I saw a tentative 6.4.1, so there still could be hope this can make it into GCC 6. I also did the experiment of compiling libgcj with -ffunction-sections -fdata-sections and then use --gc-sections when linking to see if that helps remove dead code. Somehow, that instead increased the size of a simple test program (with multithreading & sockets) from 4.54 to 4.72 MiB. "I was hoping to keep GCJ up to date to use it for OpenJDK bootstrapping" That paranoid? Why not use the minimal Eclipse Java compiler which Classpath uses for bootstrapping? It sounds like ECJ can't be trusted if it was compiled with an untrusted/unknown compiler. On Mon, Jan 1, 2018 at 5:38 AM, Brian Jones wrote: > I believe the idea of including only code which you specify is required > came up before on the list many years ago. Hopefully a search through > archives can be instructive. > > Brian > > > On Dec 24, 2017, at 2:44 PM, Yale Zhang wrote: > > > > Greetings. I have a patch that allows GNU java to target MingW64 > > (host=GNU/Linux only). Are you guys still taking patches now that Java > > has been removed from GCC 7? Or would it be more appropriate to host > > it on my own website or instructables.com? > > > > I also have another patch that cuts all the GUI, cryptography, and non > > UTF8/16 charset support from libgcj. This reduces the size of > > statically linked EXEs a lot (~27MiB to 4.5 MiB for a hello world > > program). This is important for a legacy utility that other developers > > use on Windows and who don't want to install a Java runtime. > > > > Commenting out and deleting code is a crude way to do, I know. Should > > use conditional compilation and even explore what's causing GUI code > > to be dragged into a hello world program. Maybe dead code removal > > isn't working (need to compile with -ffunction-sections and > > --gc-sections?) > > > > appreciate your feedback, > > -Yale >