From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-x52e.google.com (mail-pg1-x52e.google.com [IPv6:2607:f8b0:4864:20::52e]) by sourceware.org (Postfix) with ESMTPS id 26E183858D20 for ; Tue, 19 Sep 2023 16:38:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 26E183858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pg1-x52e.google.com with SMTP id 41be03b00d2f7-573c62b3cd2so4342254a12.3 for ; Tue, 19 Sep 2023 09:38:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695141533; x=1695746333; darn=sourceware.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=T/LbCRAPojL+MTDnh/p0nWr7b/47Eh5kLIRV4mfN5WE=; b=AA0Uo1ibxLqNNUuarsGJCatzsvPn7bBy9tlrHDoKf/BpNxwRxOSbMGvLQ9HY8FD1M5 Y4QRs8wS9kGFApmajaBPbQah+MNngFiok5LHuKa8qjUgKpfZmtl0NwP6wAdS+nn6loOk Owbz5SWumC/Q6m+1nNX5xQQV3fWmsikDxfewmPyUmh3dPh4gnmHEqAick5r5nCF08ojX Eqn1KHhjpDWDatPaH3gw4Zajx2OqS3ck5hQHeBFhpyPC1qLQTNHAD/kxSwbcUwiFZ2aB 164wCRsRA4/36mc9Eg2dAYW7rq+69CMpdlDDfBH62R6L9QWqKkTtcHaaqk+nnmTEZTw8 HF9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695141533; x=1695746333; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=T/LbCRAPojL+MTDnh/p0nWr7b/47Eh5kLIRV4mfN5WE=; b=QkBrGs5ytTwwVkv6jaMeJ4t8q6/A2n7q0KYAf/vWZG4RdzKZu39CbpvOmDajpiqaZJ zim2OBou/UL5hhj/XSYMqDB2G9SfNTAxEY+dkKlWs8vffeEA3lbN2Z3vx7YHxET5gtu4 KchuP6l3gDSyyoGEbbh/av+5mgonMrKaB7LU0QxdI7GFf0x8CerXqwHJR3tETIYglgr3 OwO0REug6j2Xkc+qPpPa2xsBUXR+WB47B3892nCbPGNYdL5bqiSdVdVHGAkerCqQ715j CuoOL9wAqLn3H/8Np4uJitomynrj+K0N6l8v8wG0KCVFMoBuS0xakW0e78F4gFnjfaTS 7F9Q== X-Gm-Message-State: AOJu0YzZB2Qr/Ys+lM7ApcaSEt4eAx1arAd3wsdfmy4bV8dsyr9pxASB SH4Go/9VS38CJERhfAPkOKvWm7v3D5rvNwbja9M= X-Google-Smtp-Source: AGHT+IFcKLt5gjOEs12VD2MVpc5vYaBoJF1J394uVksZzrgA8JDplJTqVNmpk77tSmdwkuTBA8TgC4S5zbRy2FruC9U= X-Received: by 2002:a17:90b:17c3:b0:263:f4cc:a988 with SMTP id me3-20020a17090b17c300b00263f4cca988mr252298pjb.5.1695141532856; Tue, 19 Sep 2023 09:38:52 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Francisco Javier Trujillo Mata Date: Tue, 19 Sep 2023 18:38:41 +0200 Message-ID: Subject: Re: PlayStation 2 newlib port To: Jeff Johnston Cc: newlib@sourceware.org Content-Type: multipart/alternative; boundary="000000000000e8f7090605b8e495" X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --000000000000e8f7090605b8e495 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Any update here? I'm really interested in this, I would like to mainstream PS2 and PSP, and I'm also aware that the Dreamcast community is also preparing it for mainstreaming it. Cheers El mar, 20 jun 2023 a las 9:05, Francisco Javier Trujillo Mata (< fjtrujy@gmail.com>) escribi=C3=B3: > Hello Jeff, > > First of all thanks for replying and paying attention to my message. > > To install the proper PS2 Environment to be able to compile and generate > PS2 binaries, you require to follow the steps given here: > https://github.com/ps2dev/ps2dev > > The PS2 is a complex machine, (it has 3 main CPUs DVP, IOP, and EE, which > means 3 toolchains...) so the whole PS2 development environment is not an > easy thing, there are plenty of tools and repositories involved, and as > part of this set of tools, and we also have Newlib, as you can see in the > next link (which is using a fork with our specific changes). > https://github.com/ps2dev/ps2toolchain-ee/blob/main/scripts/003-newlib.sh > > However, if we just want to check if Newlib compiles for this PS2 port we > are creating, we just need to pay attention to the EE CPU, which is the > next repo: > https://github.com/ps2dev/ps2toolchain-ee > There under the "scripts" folder, you can see how Newlib is the 3rd step, > so if we want to check if Newlib is compiling, you just need to have prop= er > binutils and GCC installed previously (first and second steps). > > Additionally, to make easier the usage of the whole PS2 toolchain, we are > offering some precompiled toolchains: > https://github.com/ps2dev/ps2dev/releases/tag/latest > And also the possibility of using dockers: > > https://hub.docker.com/layers/ps2dev/ps2dev/latest/images/sha256-e6000652= 581b4d43d135f1862ecccabe4b11dd2afa3edb667b48736d815b59c1?context=3Dexplore > > For executing the generated binaries, you will require either a PS2 that > allows you to execute homebrews or a PS2 emulator. > > Regarding the changes I have made, all the files have been created from > scratch for me, anyway, I'm part of the PS2Dev community, so I will add t= he > PS2DEV license to these files. > > > Finally, regarding my original request, I was suffering issues when > compiling Newlib after adding the specific PS2 changes, I have found a > workaround to make it work, that probably will tell you more about the > actual issue. > When adding a new "sys" to the Newlib, in our case "newlib/libc/sys/ps2", > if you just add the crt0 file (it doesn't matter if it is .S, .s or .c), > which means that you "Makefile.inc" is going to be empty, you will suffer > the compilations issues that I previously mentioned. > fatal error: opening dependency file libc/sys/ps2/.deps/crt0.Tpo: No such > file or directory > > However, if you add an extra file in the sys/ps2 directory, like a dummy.c > empty, and obviously, add the reference of this file into the > "Makefile.inc", then the library compiles properly generating the expected > ".a" and ".o" files. > > I suppose that the same issue that I'm speaking about most probably is > also being suffered with the tic80 system. > https://github.com/bminor/newlib/tree/master/newlib/libc/sys/tic80 > > Finally, I'm going to attach the compilation log. > > > Regards, > Francisco. > > El lun, 19 jun 2023 a las 22:42, Jeff Johnston () > escribi=C3=B3: > >> Hi Francisco, >> >> If you would like help, I would suggest you tell others where they can >> get a proper toolset to build with or at least >> attach your build log which may provide more info. I certainly don't >> have a Playstation 2 toolset hanging around. >> >> In addition, looking at your patches, you are missing copyright/licensing >> info for the new files you are adding >> (as opposed to existing files you are modifying). If you are taking code >> from another location, you cannot change >> their license/copyright. If you wrote these from scratch you should >> indicate this but you still need to add the licensing/copyright >> info. >> >> Regards, >> >> -- Jeff J. >> >> On Tue, Jun 13, 2023 at 2:31=E2=80=AFPM Francisco Javier Trujillo Mata < >> fjtrujy@gmail.com> wrote: >> >>> Hi there! >>> I would like to mainstream the PS2 newlib port. So far the PS2 has had >>> newlib ports for years, however, it was never intended to be merged into >>> the mainstream. >>> >>> I'm now trying to port to the latest release 4.3.0, however, I'm >>> suffering >>> some errors during the compilation process. >>> >>> I have attached the changes that I have done so far. >>> Then I just rerun the command `autoreconf` using the proper autoconf and >>> automake versions >>> >>> I execute `configure` with: >>> >>> PROC_NR=3D$(getconf _NPROCESSORS_ONLN) >>> >>> TARGET=3D"mips64r5900el-ps2-elf" >>> TARGET_ALIAS=3D"ee" >>> >>> ## Create and enter the toolchain/build directory >>> rm -rf "build-$TARGET" >>> mkdir "build-$TARGET" >>> cd "build-$TARGET" >>> >>> ## Configure the build. >>> CFLAGS_FOR_TARGET=3D"-O2" ../configure \ >>> --prefix=3D"$PS2DEV/$TARGET_ALIAS" \ >>> --target=3D"$TARGET" \ >>> --enable-newlib-retargetable-locking \ >>> $TARG_XTRA_OPTS >>> >>> ## Compile and install. >>> make -j "$PROC_NR" all >>> >>> >>> And then it always fails with this error, >>> >>> fatal error: opening dependency file libc/sys/ps2/.deps/crt0.Tpo: No su= ch >>> file or directory >>> >>> Could you help me to identify where the issue is? >>> >>> Cheers. >>> >> --000000000000e8f7090605b8e495--